Google Chrome’s bleeding edge developer version Chromium supports user scripts (like GreaseMonkey on Firefox) and extensions, though both of these are still under development. First download the latest nightly Chromium build, unzip it, and create a shortcut to the chrome.exe file with the parameters:
--enable-user-scripts --enable-extensions --load-extension="c:\chrome_extensions\adblock"
Again, create a directory for the extensions: I myself used c:\chrome_extensions in the above example; create a subdirectory adblock in that. Yes, we’re going to use an “extension”, instead of a user script; why? Because both for me and for Yaanno user scripts were flaky, caused lots of crashes and they did not work (as of this writing; in the future I’m sure they will).
Create a manifest.json file in the adblock directory:
{
"name": "Simple AdBlocking",
"version": "1.0",
"description": "AdBlocking via CSS rules",
"content_scripts": [
{
"matches": ["http://*/*"],
"css": ["adblock.css"]
}
]
}
Now create an adblock.css file; I have some rules I wrote myself, but probably the best idea is to copy paste a userContent.css filled with adblocking rules. So this is just a small example (don’t forget, Chrome can deal with some pretty powerful css3 selectors):
div[id^=superbanner],
div[class^=hirdet],
div[id^=adocean],
div[id$=banner],
div[id$=adlink]
{ display: none !important; }
Now start Chromium with the shortcut; you can see, reload or remove the installed extensions at chrome://extensions – hopefully now you have less ads around. Still, this is a very crude solution; hopefully user scripts will be more stable/usable soon: using those with run-at document-start will give us even more power than with GreaseMonkey.
Be aware that if you want to use multiple extensions together, as of this writing you have to package them into crx files using a python tool!!