Skip to content

False positives on low-zoom and/or high-pixel-ratio #34

@steevee

Description

@steevee

Steps to replicate

  1. Go to https://fuckadblock.sitexw.fr/blockadblock/ without an adblocker enabled on Chrome (v70+)
  2. Ensure browser zoom level is 100% and note value of window.devicePixelRatio
  3. If window.devicePixelRatio == 1 then zoom out to 33% and refresh page.
    • Outcome: AdBlocker detected
    • Desired: AdBlocker should not be detected
    • N.b. If window.devicePixelRatio > 1 (i.e. testing on a retina screen) zoom level and window dimensions may differ slightly to above.

Technical issue

The above steps mean this._var.bait.offsetHeight, this._var.bait.offsetWidth, this._var.bait.clientHeight, this._var.bait.clientWidth all equal zero and flag detected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions