views:

29

answers:

1

I really don't know whether i am supposed to ask such question here or not. But anyways,

I am trying to run the following javascript code on address bar*:

javascript:if ( document.getElementById('meebo') ) document.getElementById('meebo').style.display='none';

this meebo bar on any website is just an annoyance :x . Now the problem i am facing is, when i press return, it shows the page with only 'none' written on it. Try it on http://www.hongkiat.com any website having meebo bar installed on it.

Another problem is, i want this code to be executed every time any page is displayed. I think we can do this using greasemonkey, but i am sure there will be another easier answer.

*by saying run on address bar, i mean copy the above code and paste it to address bar and hit return.

A: 

You need to wrap this in a function:

javascript:(function(){if(document.getElementById('meebo'))document.getElementById('meebo').style.display='none'})();
Mike Robinson