AdguardTeam / AdguardTeam/Scriptlets

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

未关闭
#503 0 条评论 0 个 reaction 已指派 1 人 已被 @maximtop 认领 在 GitHub 查看
enhancement Priority: P4
主要语言
JavaScript
星标
195
派生
33
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。