AdguardTeam / Scriptlets

AdGuard scriptlets library
GNU General Public License v3.0
150 stars 30 forks source link

Fix spoof-css — mocked function is detected at t.hi098123.com #422

Open piquark6046 opened 7 months ago

piquark6046 commented 7 months ago

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.

piquark6046 commented 7 months ago

@gorhill uBlock Origin is also affected.

JobcenterTycoon commented 7 months ago

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:

  1. Enable kr: List-KR and disable cosmetic filtering for the site with @@||t.hi098123.com^$ehide (to prevent other detections).
  2. Add t.hi098123.com##+js(spoof-css, random32456236, display, block)
  3. open the site. The date field is empty even after several reloads.
  4. Disable the spoof-css filter and reload again. The date field will come back.
pic