Skip to content

Handle Element.prototype.getClientRects in spoof-css scriptlet #4011

@piquark6046

Description

@piquark6046

Prerequisites

  • I verified that this is not a filter list issue. Report any issues with filter lists or broken website functionality in the uAssets issue tracker.
  • This is NOT a YouTube, Facebook or Twitch report. These sites MUST be reported by clicking their respective links.
  • This is not a support issue or a question. For support, questions, or help, visit /r/uBlockOrigin.
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue.
  • The issue is not present after disabling uBO in the browser.
  • I checked the documentation to understand that the issue I am reporting is not normal behavior.

I tried to reproduce the issue when...

  • uBO is the only extension.
  • uBO uses default lists and settings.
  • using a new, unmodified browser profile.

Description

Screenshot

Image

A website can use Element.prototype.getClientRects 1 to check if the HTMLElement is hidden.

Related to AdguardTeam/AdguardFilters#231525, AdguardTeam/AdguardFilters#231315, uBlockOrigin/uAssets#32989 and List-KR/List-KR#1051

A specific URL where the issue occurs.

`https://sbxh2.com/manhwa/25893/336822`
`https://sbxh1.com/`

Steps to Reproduce

  1. Enable List-KR classic filters list.
  2. Visit the webpage.
  3. Await up to 15 seconds.

Expected behavior

The anti-adblock popup does not appear.

Troubleshooting information

uBlock Origin: 1.70.0
Firefox: 152
filterset (summary):
 network: 173600
 cosmetic: 45990
 scriptlet: 33623
 html: 3404
listset (total-discarded, last-updated):
 added:
  KOR-1: 4766-14, now
 default:
  user-filters: 0-0, never
  ublock-filters: 52361-78, now Δ
  ublock-badware: 11178-29, now Δ
  ublock-privacy: 4016-4, now Δ
  ublock-unbreak: 2822-1, now Δ
  ublock-quick-fixes: 476-14, now Δ
  easylist: 94497-210, now Δ
  easyprivacy: 56003-44, now Δ
  urlhaus-1: 28565-11, 2d.23h.42m
  plowe-0: 3511-1042, 2d.23h.42m
filterset (user): [empty]
userSettings:
 userFiltersTrusted: true
hiddenSettings: [none]
supportStats:
 allReadyAfter: 289 ms
 maxAssetCacheWait: 174 ms
 cacheBackend: indexedDB

Footnotes

  1. https://developer.mozilla.org/en-US/docs/Web/API/Element/getClientRects

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions