Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Some forums allow direct embedding of YouTube videos, and it's slowing down my browsing a lot when a user posts several videos in a single post. I want to allow YouTube's script only on youtube.com, not anywhere else.

I also want to disable social network tracking scripts on other sites so that Facebook/etc. is only allowed on their home domain, but I couldn't find out how to do it.

How do I set up the blacklist with exceptions? or whitelist with conditions?

share|improve this question
add comment

1 Answer 1

You'll have to use a feature the noscript author calls 'ABE', accessible through noscript options->advanced->ABE

the syntax looks something like this:

# comment
# .example.com includes example.com and subdomains of example.com
# example.com includes example.com but excludes its subdomains

#Allow akamaihd scripts and objects to be included only from select hosts
Site .akamaihd.net
Accept from .twitter.com
Deny INCLUSION(SCRIPT, OBJ, SUBDOC)

Site .akamai.net
Accept from github.com
Deny INCLUSION(SCRIPT, OBJ, SUBDOC)

Site .googleusercontent.com
Accept from .picasaweb.google.com .translate.google.com
Deny INCLUSION(SCRIPT, OBJ, SUBDOC)

In your case, you might need something like:

Site .youtube.com .ytimg.com
Accept from .youtube.com
Deny INCLUSION(SCRIPT, OBJ, SUBDOC)

If you also want to enable Youtube's comments and other social features, you will need:

Site .google.com .googleapis.com .youtube.com .ytimg.com
Accept from .youtube.com
Deny INCLUSION(SCRIPT, OBJ, SUBDOC)

For more information, see the Noscript:ABE documentation at:

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.