Scriptlets
Scriptlets copied to clipboard
Improve 'spoof-css ' — mock 'checkVisibility()' method
Steps to reproduce:
- Add to user rules:
example.org##h1
example.org#%#//scriptlet('spoof-css', 'h1', 'display', 'block')
- Go to - https://example.org/
- In console run:
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