Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I use page that has very annoying alert onLoad, I'd like to block JavaScript on that site(its http://somedomain/home.jsf), but I need JS to use the rest of the web-app.

Can I block scripts only on home.jsf?

share|improve this question

4 Answers 4

up vote 3 down vote accepted

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.

share|improve this answer
    
i think GM is fired after the page has already loaded, can I really stop this alert? –  IAdapter Jan 10 '11 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 '11 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
Deny INCLUSION(SCRIPT, OBJ, SUBDOC)

# 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
Deny INCLUSION(SCRIPT, OBJ, SUBDOC)

# 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
Deny INCLUSION(SCRIPT, OBJ, SUBDOC)
share|improve this answer

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

share|improve this answer

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.)

share|improve this answer
    
The formatting language used here is MarkDown, so the inline syntax (not using footnotes) is [link text](url) –  Joe Jan 10 '11 at 16:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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