Background
Xombrero comes with GreaseMonkey-like functionality. For those unfamiliar with GreaseMonkey, it allows you to apply javascript to the result of a web page. This allows you to modify the page result after all other rendering has taken place. For example, if you would like to highlight or set the focus to a specific text box or remove an image from the page. See the man page for details (search for “enable_js_autorun”).
startpage.com is a privacy based search engine - in basic terms - it tries to remove tracking features and functionality that Google adds/uses to track users. Startpage is a great search engine, the only issue I have is they inject their Google Ads before your search result. I’m also ok with this but I do have a problem when I cannot easily distinguish the ads from my search results.
The following is a basic example of using Xombrero’s js_autorun feature to “enhance” the results of a startpage.com search.
Detail
To use the js_autorun functionality we will create a file with the needed javascript (one line of code) and set the enable_js_autorun config variable to tell Xombrero you want to use js_autorun.
- open your Xombrero instance’s config file (or if you are using the default, open ~/.xombrero.conf) and add the following line to the end of the file:
enable_js_autorun = 1
- create a js autorun file for startpage.com (the following script will create the file and insert the needed line of code for you):
echo "document.getElementById('spon_links').style.border = '1px solid red';" > ~/.xombrero/js/startpage.com.js
That’s all there is to it!
Now if you reload the startpage.com page or run a new search you will get a thin, clean red border around all of the ads that startpage.com has added to my search results such as follows:
Notes
Be warned that startpage (infrequently) changes the div id of the wrapper around their ads. Below is my archive of changes (eventually I’ll put this in git for everyone to pull).
|
|