Page 1 of 1

allow script only if visiting page x

Posted: Mon Feb 22, 2010 8:41 pm
by Thomas
Hello there,
first: good job! :) Noscript ist one of my must-have AddOns.

But today i found something, what i would like to use. Maybe it's already possible but i don't know how.

Example: I visit Facebook. I want to allow scripts from www.facebook.com, makes the use easier. But there are also many pages, which uses facebook-widgets. I don't want to allow facebook on these pages. So i want to allow facebook only if i'm visiting facebook.com, but it should be blocked on any other page. At the moment facebook is allowed on every page. How can I define such a rule? Another example is google. Google should be allowed only if there stands google.com in my addressbar.

Could you help me? Thanks a lot!

Re: allow script only if visiting page x

Posted: Sun Apr 25, 2010 1:03 am
by OrenHadar
I am curious about this too. Facebook seems to be popping up on a lot of other sites (e.g. huffingtonpost.com), and I would like to block it there but keep the functionality on Facebook itself.

Re: allow script only if visiting page x

Posted: Sun Apr 25, 2010 6:56 am
by Giorgio Maone
OK, this is quite scary (as someone hinted at here).

Something can be done with ABE, by adding the following rule to the USER ruleset in NoScript Options|Advanced|ABE:

Code: Select all

# Don't tell Facebook everything you browse
Site .facebook.com .fbcdn.net
Accept from SELF
Accept from .facebook.com .fbcdn.net
Deny
Notice that you won't be able to follow links to Facebook from any site outside FB itself, though.
This will eventually be improved (see http://forums.informaction.com/viewtopi ... 66&e=16966 )

Re: allow script only if visiting page x

Posted: Sun Apr 25, 2010 6:45 pm
by OrenHadar
Giorgio,

Thank you very much, that worked great! It would be really nice if in the future NoScript gave us an easy option to block a site from loading on a specific site. So in other words, if I was browsing huffingtonpost.com and wanted to block Facebook, the NoScript menu would list options for "Forbid facebook.com" and "Forbid facebook.com on huffingtonpost.com only".

Re: allow script only if visiting page x

Posted: Sun Apr 25, 2010 9:30 pm
by GµårÐïåñ
A more intuitive and user-friendly interface is in the works as he has mentioned many times before but in the meantime you can do it yourself through ABE or if you can't figure out from the documentation, you can ask and as you can see already provided, we do our best to give you the code to use until an easier way is devised. Take care.

Re: allow script only if visiting page x

Posted: Sun Apr 25, 2010 10:59 pm
by OrenHadar
Um, yes, thanks again!