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

script:contains() does not work in WebExtensions #3255

Closed
haarp opened this issue Nov 21, 2017 · 8 comments
Closed

script:contains() does not work in WebExtensions #3255

haarp opened this issue Nov 21, 2017 · 8 comments

Comments

@haarp
Copy link

haarp commented Nov 21, 2017

Recent versions of uBlock for Firefox seem to not support script:contains() anymore. As Firefox 57 is out now, I have no way of running a previous uBlock release.

Inline script tag filtering, as described in the documentation, looks like it should be working. Yet it is not. I think this is known already, at least the first WebExtension beta had it in it's changelog. However I could not find any reference or issue report for the release version, so either I am doing something terribly wrong, or this is indeed an issue.

Tested using uBo 1.14.18 in Firefox 54 and 57, with otherwise virgin uBo configs.

If this is known, can you link the corresponding issue # or Mozilla bug report if additional features are yet to be implemented?

Thanks!

@Halibut80
Copy link

@kowith337
Copy link

##script:contains() no longer support in WebExtension (Same as chrom[e|ium])

You need to look for other rules or fallback to Firefox ESR or other forks, e.g. Cyberfox, Waterfox, Pale moon.

@gorhill
Copy link
Owner

gorhill commented Nov 21, 2017

This has been documented in the release notes when the webext version of uBO came out.

@gorhill
Copy link
Owner

gorhill commented Nov 21, 2017

Documentation updated.

@uBlock-user
Copy link
Contributor

WebExtensions is based on Chrome's Extension API, so it doesn't have BSE/ASE by default.

@gorhill
Copy link
Owner

gorhill commented Nov 21, 2017

Note that if you are comfortable with javascript, script:inject(abort-current-inline-script.js, ...) can be used often to disable specific script tags.

@gorhill
Copy link
Owner

gorhill commented Dec 30, 2017

Fixed with a9f68fe, available in dev build on AMO. However use the new HTML filtering syntax (which is meant to remove any element, not just script tags):

example.com##^script:has-text(...)

For the time being however, uBO will convert the old, specialized syntax to the new HTML filtering syntax.

@airone506
Copy link

airone506 commented Mar 29, 2018

My question deleted. Opening a separate issue for my question seems to be a better idea.

medavox added a commit to medavox/uor that referenced this issue Jan 21, 2019
script:contains syntax is now [deprecated due to browser updates](gorhill/uBlock#3255), but [inline script-tagging](https://github.com/gorhill/uBlock/wiki/Inline-script-tag-filtering) seems to do what I want, at least on Firefox
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

6 participants