AdguardTeam / AdguardTeam/Scriptlets

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

Ouverte
#464 0 commentaires 0 réactions 1 personne assignée Réclamée par @maximtop Voir sur GitHub
enhancement Priority: P4
Langage dominant
JavaScript
Étoiles
195
Forks
33
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.