Page 1 of 1
Forbid only one script on an allowed site?
Posted: Wed Feb 02, 2011 7:49 am
by webdev50
Hi,
NoScript is great. Thank you!
Is it possible to forbid one specific script on an allowed site? For example, sfgate.com displays a black "video" widget on the right side of most pages, such as at
http://www.sfgate.com/cgi-bin/article.c ... 1HEK9S.DTL . I prefer not to forbid all scripts because some of them are useful, such as for the comments.
Thanks!
Re: Forbid only one script on an allowed site?
Posted: Wed Feb 02, 2011 5:26 pm
by twilson
This was a question that I also asked on the list a little while ago, and haven't yet received a reply, so I'll join you in asking it again. If there isn't a way to do this currently, it would be a nice feature to have, although there is the slight problem of how to present the scripts to the user and ask them which to disable. Do you list the all code (even if obfuscated) of each script? Do you just give the list of functions and global variables defined? Etc. Somebody who is not a programmer may have trouble trying to decide which script to disable -- but, if they are annoyed, I guess they wouldn't mind trial and error, even if it takes longer!
Re: Forbid only one script on an allowed site?
Posted: Wed Feb 02, 2011 5:38 pm
by Giorgio Maone
If you manage to figure out the URL of the actually offending script, you can add a rule to your
ABE USER ruleset, like this:
Code: Select all
Site http://url.to/the-offending/script.js
Deny
Re: Forbid only one script on an allowed site?
Posted: Wed Feb 02, 2011 5:47 pm
by twilson
Good to know, Giorgio. But what if the script is embedded (i.e., without an "src" attribute)?
Re: Forbid only one script on an allowed site?
Posted: Wed Feb 02, 2011 6:02 pm
by Giorgio Maone
twilson wrote:Good to know, Giorgio. But what if the script is embedded (i.e., without an "src" attribute)?
Then things are more complicated, but still possible to tame with
Script Surrogates.
Re: Forbid only one script on an allowed site?
Posted: Fri Feb 04, 2011 7:29 am
by webdev50
Frickin' awesome! This did it:
Code: Select all
Site http://imgs.sfgate.com/js/partners/ndn/stepcarousel.js
Deny
The first two scripts I tried were the wrong ones.
Thank you Giorgio!