Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow whitelisting of second-level domains #5

Open
tung opened this issue May 29, 2009 · 1 comment
Open

Allow whitelisting of second-level domains #5

tung opened this issue May 29, 2009 · 1 comment

Comments

@tung
Copy link
Owner

tung commented May 29, 2009

99.9% of the time, when you want to allow JavaScript on www.example.com, you also want to allow it for example.com, cdn.example.com, blog.example.com, etc. the so-called second-level domains.

SomeScript should either do this by default, or provide it as an option. NoScript allows this as an option.

@tung
Copy link
Owner Author

tung commented May 29, 2009

nsIEffectiveTLDService allows me to get those second-level domains through its getBaseDomainFromHost function. That makes it easy to whitelist on and check against a list of second-level domains.

The hard part is blocking. I can listen on nsIWebProgress with a nsIWebProgressListener, but how would I actually allow/block JavaScript requests?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant