Scriptlets icon indicating copy to clipboard operation
Scriptlets copied to clipboard

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

Open AdamWr opened this issue 7 months ago • 0 comments

Steps to reproduce:

  1. Add to user rules:
example.org##h1
example.org#%#//scriptlet('spoof-css', 'h1', 'display', 'block')
  1. Go to - https://example.org/
  2. 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

AdamWr avatar May 23 '25 07:05 AdamWr