Last active
February 15, 2025 22:03
-
-
Save obfusk/0e9203a2fc9e883a273413ff9173d7ab to your computer and use it in GitHub Desktop.
reload all broken images
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // firefox only | |
| (async () => { for (const x of document.querySelectorAll("img:-moz-broken")) { x.src = x.src; await new Promise(r => setTimeout(r, 100)); console.log(x) }; console.log("done") })() | |
| // generic | |
| (async () => { for (const x of document.querySelectorAll("img")) { if (!x.naturalWidth) { x.src = x.src; await new Promise(r => setTimeout(r, 100)); console.log(x) } }; console.log("done") })() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment