AdguardTeam / AdguardTeam/Scriptlets

Improve 'spoof-css ' — mock 'checkVisibility()' method

Open
#503 0 comments 0 reactions 1 assignee Claimed by @maximtop View on GitHub
enhancement Priority: P4
Dominant language
JavaScript
Stars
195
Forks
33
PR merge metrics
No merged PRs in 30d

Description

Steps to reproduce:
1. Add to user rules:
```adblock
example.org##h1
example.org#%#//scriptlet('spoof-css', 'h1', 'display', 'block')
```
2. Go to - https://example.org/
3. In console run:
```js
document.querySelector('h1').checkVisibility()
```

It returns `false` if element is not visible, so we could mock `checkVisibility` to fix it.
https://developer.mozilla.org/en-US/docs/Web/API/Element/checkVisibility

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.