Fix 'spoof-css' — mocked function is detected at t.hi098123.com
If no AdGuard filters and user rules are enabled, functionality of the webpage [^1] works well. However, if I add the following rule into my AdGuard Browser Extension 4.3.46 user rules:
t.hi098123.com#%#//scriptlet('spoof-css', '.adguard-sample', 'debug', 'true')
It will be broken because anti-adblock script of the webpage is triggered.
Related to https://github.com/AdguardTeam/AdguardFilters/issues/175799.
[^1]: In the issue, two input[aria-label="Date-Time"] elements.
@gorhill uBlock Origin is also affected.
uBO latest dev also affected. Test page: https://t.hi098123.com/datediff they detecting in general like ylilauta.org did in the past. Old code can be found here: https://github.com/kkapsner/CanvasBlocker/issues/686 @kkapsner CanvasBlocker is affected again.
How to reproduce:
- Enable
kr: List-KRand disable cosmetic filtering for the site with@@||t.hi098123.com^$ehide(to prevent other detections). - Add
t.hi098123.com##+js(spoof-css, random32456236, display, block) - open the site. The date field is empty even after several reloads.
- Disable the spoof-css filter and reload again. The date field will come back.