[jQuery] run javascript through the address bar on a site

[jQuery] run javascript through the address bar on a site

Hey,
This question is not but related to jquery but to javascript.
i hope this is the right place for that aswell.
On some sites that i visit there are some annoying ads which can be "blocked" by changing there style to: display: none;
to do this in javascript itself you need to do something like:
document.getelementbyid('theid').style.display = 'none';
but how do i run that in the address bar so that the style of that id is changed to none?
i tried: javascript:document.getelementbyid('theid').style.display = 'none';
but that isn`t working.
any suggestions?