Closed dportvine closed 3 months ago
Just lowering the filtering mode to Basic/Optimal then back to Complete causes the ads to show up afterward, but then, not always. Looks like a timing issue, this needs more investigation.
When the following error appears at the console, ads are blocked, if not, ads are not blocked:
Possibly related to this filter:
##script[onerror*="error-report.com"]:watch-attr(onerror):remove-attr(onerror)
This site looks like related to ad-shield so there might be some side-effects with the filters related to it.
It's definitely a timing issue, oftentimes the target script won't be found in the DOM, hence its onerror
handler can't be removed.
The only way I found to address the issue is to instead use a filter based on ra.js
scriptlet, along with some modifications to the scriptlet to allow for "remove attribute asap":
eurointegration.com.ua##+js(ra, onerror, script[onerror*="error-report.com"], asap stay)
When asap
is present, the scriptlet will not only find the target element immediately upon injection, but also immediately when the mutation observer is triggered. This results in a much more reliable filtering, though sometimes a placeholder can be left at the top -- possibly addressable with a cosmetic filter.
Solution has been to improve ra.js
to make it possible to remove attribute without delay when DOM changes are detected, and to add a filter using ra.js
as a reliable replacement for the procedural cosmetic filter ##script[onerror*="error-report.com"]:watch-attr(onerror):remove-attr(onerror)
.
I have verified that I could not reproduce the issue with the new ra.js
filter.
cc @JobcenterTycoon
For some ad-shield websites in uBOL
Probably that filter is also more reliable in uBO.
Probably that filter is also more reliable in uBO.
You mean this one?
##+js(ra, onerror, script[onerror*="error-report.com"], asap stay)
So, ra.js
will not be removed eventually into the future ?
How can I get a version of uBOL with these latest changes?
You have to build it yourself I think.
So,
ra.js
will not be removed eventually into the future ?
Can't remove it for now since it's the only one that can reliably remove on...
handlers in Firefox, remove-attr()
doesn't work because it's executed in isolated world. Now with the improvment here, it has become more reliable for removing on...
handlers in any browser since cosmetic procedural filters always execute in a lazy way by design.
How can I get a version of uBOL with these latest changes?
Is eurointegration.com.ua
considered a high traffic site? If so, I could release a new version of uBOL.
Is
eurointegration.com.ua
considered a high traffic site? If so, I could release a new version of uBOL.
The problem is only in the new tab, the new version is not needed.
@JobcenterTycoon I think asap
is not available for uBO stable yet, so we might still need :remove-attribute()
?
Yes sorry i forgot there was a latest scriptlet change.
Open this link in a new tab https://www.eurointegration.com.ua/news/2024/08/5/7191539/ Wait 10 seconds and click on the tab, the empty space at the top is not hidden. In uBOL i see ads. You need clear cache after reload page.
Google Chrome 127.0.6533.89, uBOL 2024.8.5.925
Video uBOL
https://github.com/user-attachments/assets/5dab6a0a-84bb-43d4-9153-abf0053e3316Also https://github.com/uBlockOrigin/uAssets/issues/24781