I was so amazed with the script plugins on firefox. Yeah! They enhance the website UI so much!
Now I use
GreaseMonke and
Stylish for GoogleReader, Gmail, last.fm, DeviantArt, Flickr, Hotmail, Download.com, Twitter, Photobucket and so on.
I am a
Naruto fan. And I found one
online comic site about Naruto. But one block of advertiesment make me crazy! Who can bear this?
So the impulse to write one script to hide the block come out from my brain.
After read some source scripts, I wrote as the below:
// ==UserScript==
// @name 1mh comic
// @description Say goodbye to Demonoid's most annoying ads ever. (v1.1)
// @include http://www.1mh.org/html/*
// ==/UserScript==
var adContainer = document.getElementsByTagName('table')[0];
if (adContainer)
adContainer.parentNode.removeChild(adContainer);
adContainer = document.getElementsByTagName('table')[1];
if (adContainer)
adContainer.parentNode.removeChild(adContainer);
adContainer = document.getElementsByTagName('table')[2];
if (adContainer)
adContainer.parentNode.removeChild(adContainer);
adContainer = document.getElementsByTagName('table')[5];
if (adContainer)
adContainer.parentNode.removeChild(adContainer);
adContainer = document.getElementsByTagName('table')[6];
if (adContainer)
adContainer.parentNode.removeChild(adContainer);
--------------------------------------------------------------------
Yes, I only keep the 3rd(image) and 4th(page control) table. So simple! The script is dirty, but I needn't make it clean.
After install my script, the result page display so clean.
So cool! Ok, let's code anywhere and anytime.
Labels: coding, firefox