Page 1 of 1

Allow sites only when visiting them directly

Posted: Wed Dec 14, 2016 3:57 pm
by Danielvr
I'm sorry for asking what's probably a very basic question, but I haven't managed to find an answer elsewhere.

There are some sites (or rather, domains) that I do not want to allow globally. For instance, Twitter and Facebook are represented on millions of other sites that embed live information from them, including scripts, and I want to block them there. But I may still want to visit Facebook or Twitter directly, and then their scripts should be allowed or their sites won't work.

I have 'Temporarily allow top-level sites by default' turned off, and I intend to keep it that way. But I guess what I want is to allow some sites (like FB and Tw) when, and only when, they are the top level.

How do I accomplish this? Thanks in advance for any replies! :)

Re: Allow sites only when visiting them directly

Posted: Wed Dec 14, 2016 4:10 pm
by barbaz
https://noscript.net/faq#qa8_10
or wait for noscript 3

In your case, use this ABE rule for twitter -

Code: Select all

Site .twitter.com
Accept from .twitter.com
Deny INC(SCRIPT, OBJ, FONT, XHR, MEDIA)
Sandbox INC

Re: Allow sites only when visiting them directly

Posted: Wed Dec 14, 2016 4:31 pm
by Danielvr
Thanks kindly Barbaz!

Re: Allow sites only when visiting them directly

Posted: Wed Dec 14, 2016 4:39 pm
by barbaz
You're welcome! Image