Ublock: script:contains() does not work in WebExtensions

Created on 21 Nov 2017  路  8Comments  路  Source: gorhill/uBlock

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!

Most helpful comment

Fixed with a9f68fe02f40472c, 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.

All 8 comments

##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.

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

Documentation updated.

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

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

Fixed with a9f68fe02f40472c, 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.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rvandermeulen picture rvandermeulen  路  4Comments

splattadat picture splattadat  路  4Comments

GitHubBlow picture GitHubBlow  路  4Comments

thebigsmileXD picture thebigsmileXD  路  3Comments

RoxKilly picture RoxKilly  路  4Comments