Skip to content

Possible to spoof ClientRects now? #3998

Description

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.
  • 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.
  • using a new, unmodified browser profile.

Description

Confusion about spoof-css.js, does this mean ClientRect spoofing is now possible with uBlock Origin via my filters?

Element.prototype.getBoundingClientRect()

_rectx: The X coordinate
_recty: The Y coordinate
_rectw: The width
_recth: The height

Is my understanding correct?
If yes how does one create a filter to poof per website?

I tried browserleaks.com##+js(spoof-css, selector, _rectx, 100, _recty, 50, _rectw, 200, _recth, 150) but it didn't work?

A specific URL where the issue occurs.

https://browserleaks.com/rects

Steps to Reproduce

Go to my filters and add this line browserleaks.com##+js(spoof-css, selector, _rectx, 100, _recty, 50, _rectw, 200, _recth, 150)

Expected behavior

to spoof rects without needing another extension

Actual behavior

same fingerprint

Configuration

\

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