I use a page with a very annoying alert onLoad, I'd like to block JavaScript on that site (it's http://example.com/home.jsf), but I need JS to use the rest of the web-app.

Can I block scripts only on home.jsf?

5 Answers 5


I don't know if you can do it with NoScript, but you might be able to do it with GreaseMonkey by replacing the function or clearing the onLoad.

  • i think GM is fired after the page has already loaded, can I really stop this alert?
    – IAdapter
    Jan 10, 2011 at 16:48
  • The GreaseMonkey uses DOMContentLoaded ; this fires before window.onLoad, which doesn't fire until after the page is finished rendering ... I haven't tested to verify, though
    – Joe
    Jan 10, 2011 at 17:06

It's not the most intuitive of things, but you can do it using NoScript's Application Boundaries Enforcer.

I explained how to block just Google Search's Javascript (to kill Google Instant without logging in while still allowing easy login and use on other Google sub-sites) at How to make Google Search scriptless with NoScript/AdBlock?

You can also use it to lock scripts from sites like Facebook into the domain they come from, so scripts from Facebook will only load if you're actually on Facebook. (Good for killing off stuff like "Like This", "Tweet This", and Google Buzz buttons so you don't have to trust them as far as your privacy and browser responsiveness go):

# facebook.com containment rule
# This rule allows Facebook scripts objects and frames to be included only
# from Facebook pages
Site .facebook.com .fbcdn.net
Accept from .facebook.com .fbcdn.net

# twitter.com containment rule
# Like the Facebook rule, but for twitter
Site twitter.com .twitter.com twimg.com .twimg.com
Accept from twitter.com .twitter.com twimg.com .twimg.com

# Google Buzz containment rule
# Like the Facebook rule, but for Google
Site ^https?://www\.google\.com/buzz/.*
Accept from google.com .google.com googleapis.com .googleapis.com

You should be able to using the blacklist functionality. As opposed to the usual whitelist of sites that you allow.


NoScript deals with "domains" rather then pages.

Generally no, [url=http://forums.informaction.com/viewtopic.php?f=7&t=5468]Possible to enable scripts on one specific page?[/url].

Though there are a lot of "other" features that NoScript offers that may help (just don't ask me which, though I do seem to recall some discussion of an annoyance on a particular banks website.)

  • The formatting language used here is MarkDown, so the inline syntax (not using footnotes) is [link text](url)
    – Joe
    Jan 10, 2011 at 16:57

Try AdBlock Plus.

I presume you have the addon already. Use "Open Blockable Items" to select and create a filter. Along with ABP Element Hiding Helper, this is how I clean up over-cluttered pages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.