Allow other-site JS on certain sites only?

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

Allow other-site JS on certain sites only?

Post by Guest »

Hi,

Is there a way to allow JS from certain sites to run only on a set of allowed sites?

For instance, facebook has JS on facebook.com and fbcdn.com. I'm okay with allowing those while I'm actually browsing facebook, but I want them to stay off if I'm on some other website.
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Allow other-site JS on certain sites only?

Post by Giorgio Maone »

You can use ABE for that:
http://noscript.net/faq#qa8_10
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12
Fry-kun

Re: Allow other-site JS on certain sites only?

Post by Fry-kun »

Neat, thanks!

Although maybe it should be easier to do this... I would imagine that as a rule of thumb, users want JS to be allowed "on this site" rather than "everywhere". It's only the few special sites that have externally-called code (facebook, google, etc.). As you've probably guessed by now, I don't much like those cross-site scripts :)
Would probably have to change the code a lot, though...
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12
Guest

Re: Allow other-site JS on certain sites only?

Post by Guest »

there should be an option "allow xxxx.com on this site" right below allowing globally and temporary.


example:
I want to have disqus.com discussions visible on jquery.com but not on other sites.

I solved this with allowing disqus.com scripts in noscript but blocking them in AdBlock everywhere except on jquery.com.
But this should be a job for AdblockPlus but for NoScript (<- name says it)
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de-DE; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Allow other-site JS on certain sites only?

Post by Giorgio Maone »

Guest wrote:I want to have disqus.com discussions visible on jquery.com but not on other sites.
Per FAQ 8.10 above, in ABE:

Code: Select all

Site .disqus.com
Accept from SELF++ .jquery.com
Deny
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12
Post Reply