Forbid only one script on an allowed site?

Ask for help about NoScript, no registration needed to post
webdev50

Forbid only one script on an allowed site?

Post 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!
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8
twilson

Re: Forbid only one script on an allowed site?

Post 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!
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.10 (maverick) Firefox/3.6.13
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Forbid only one script on an allowed site?

Post 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
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
twilson
Posts: 2
Joined: Wed Feb 02, 2011 5:34 pm

Re: Forbid only one script on an allowed site?

Post by twilson »

Good to know, Giorgio. But what if the script is embedded (i.e., without an "src" attribute)?
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.10 (maverick) Firefox/3.6.13
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Forbid only one script on an allowed site?

Post 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.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
webdev50

Re: Forbid only one script on an allowed site?

Post 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!
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8
Post Reply