Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve spoof-css #463

Open
piquark6046 opened this issue Oct 29, 2024 · 1 comment
Open

improve spoof-css #463

piquark6046 opened this issue Oct 29, 2024 · 1 comment
Assignees

Comments

@piquark6046
Copy link
Member

In jQuery, height() and width() methods use Element.prototype.getBoundingClientRect to calculate size of an element.
However, AdGuard's spoof-css scriptlet does not mock completely the property.

Screenshot

image

@AdamWr
Copy link
Member

AdamWr commented Oct 29, 2024

As far as I understand, the problem occurs when 2 (or more) spoof-css scriptlets are used, for example:

example.org#%#//scriptlet('spoof-css', 'h1', 'width', '1000')
example.org#%#//scriptlet('spoof-css', 'h1', 'height', '2000')

and it looks like that the last one override/changes value set in previous scriptlet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants