Reload Broken Image

Search for images that didn't load on a page and if it finds, tell the browser to try to load them. You probably should only use this on some occasions, I think.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Reload Broken Image
// @description  Search for images that didn't load on a page and if it finds, tell the browser to try to load them. You probably should only use this on some occasions, I think.
// @namespace    replbackgroundiwithimgtag
// @version      1.0.4
// @author       k3abird
// @include      *example.com*
// ==/UserScript==

(function loop() {
  setTimeout(function () {
    (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") })()
  }, 10000);
}());

(function loop() {
  setTimeout(function () {
    (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") })()
  }, 10000);
}());