AdguardTeam / AdguardTeam/Scriptlets

Improve 'prevent-refresh' — customize 'delay' to postpone window.stop()

Đang mở
#464 0 bình luận 0 reaction 1 người được giao Được @maximtop nhận Xem trên GitHub
enhancement Priority: P4
Ngôn ngữ chính
JavaScript
Star
195
Fork
33
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

On this website `filmy4wap.co.in` there is (I have redacted URL to `example.org`):
```

```
and `filmy4wap.co.in#%#//scriptlet('prevent-refresh')` breaks loading images (not always happen on my end, but if I enable "throttling" in network panel in devtools then it occurs every time).

According to - https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#refresh:
>The timer starts when the page is completely loaded, which is after the [load](https://developer.mozilla.org/en-US/docs/Web/API/Window/load_event) and [pageshow](https://developer.mozilla.org/en-US/docs/Web/API/Window/pageshow_event) events have both fired.

So maybe we could change it, so `window.stop` will be called only after `load` event was fired.
Or just add additional option to `delay` argument, like for example `load` and `window.stop()` would be called when `load` event was fired.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.