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

Automatically lookup site-specific scriptlets. #1954

Closed
gorhill opened this issue Sep 1, 2016 · 3 comments
Closed

Automatically lookup site-specific scriptlets. #1954

gorhill opened this issue Sep 1, 2016 · 3 comments

Comments

@gorhill
Copy link
Owner

gorhill commented Sep 1, 2016

Currently, for many sites a scriptlet from resources.txt is injected. For each such scriptlet, there need to be a ##script:inject(...) filter to make use of the scriptlet. For scriptlets which are meant for specific sites, uBO should look them up automatically without the need for a filter.

For example, I just created a scriptlet in https://github.com/uBlockOrigin/uAssets/blob/master/filters/resources.txt for the site lesechos.fr -- to counter the site's anti-blocker. To make use if the scriptlet for that site, I had to create the filter lesechos.fr##script:inject(lesechos.fr.js). When landing on lesechos.fr, uBO should just automatically lookup for a scriptlet named lesechos.fr.js.

This is a common occurrence, so this will save me from having to create a filter for every instance of site-specific scriplet.

@lewisje
Copy link

lewisje commented Sep 1, 2016

What if the user wishes to disable injection of that scriptlet, with a rule like lesechos.fr#@#script:inject(lesechos.fr.js)?

@gorhill
Copy link
Owner Author

gorhill commented Sep 2, 2016

I will implement support for exceptions at the same time -- this has been reported as an issue in the past: uBlockOrigin/uAssets#23.

gorhill added a commit that referenced this issue Sep 12, 2016
At the same time, the following issues were fixed:
- #1954: automatically lookup site-specific scriptlets
- uBlockOrigin/uAssets#23
@gorhill
Copy link
Owner Author

gorhill commented Sep 12, 2016

Fixed with a7fe367.

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

No branches or pull requests

2 participants