-
Notifications
You must be signed in to change notification settings - Fork 32
Closed
Labels
Description
Steps to reproduce:
- Add this rule:
example.org#%#//scriptlet('spoof-css', 'body', 'visibility', 'hidden')- Go to - https://example.org/
- In browser console run:
const { height, width } = document.body.getBoundingClientRect();
console.log('height:', height);
console.log('width:', width);width returns incorrect value.
It's probably due to this line:
Scriptlets/src/scriptlets/spoof-css.js
Line 212 in 3ba245f
| const newDOMRect = new window.DOMRect(rect.x, rect.y, top, bottom, width, height, left, right); |
and perhaps should be changed to:
const newDOMRect = new window.DOMRect(rect.x, rect.y, width, height);https://developer.mozilla.org/en-US/docs/Web/API/DOMRect/DOMRect