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 this is slowing down my browsing a lot when a user posts several videos in a single post. I want to allow scripts from YouTube only on youtube.com, not anywhere else.

I also want to disable social network tracking so that scripts from sites like Facebook are only allowed on their home domain. How do I set up a blacklist with exceptions or a whitelist with conditions?

share|improve this question

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

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.