PageSourceSearch

https://rhn-espacepourlavie.ca/r-img-fallback.js

js rhn-espacepourlavie.ca collected 2026-10-06 16:33:37 UTC 837 bytes, 21 lines download raw bytes

1/* Wayback Fixer helper: hide images that fail to load (assets not in the archive)
2   so galleries/teams don't show broken-image icons. Keeps captions and layout,
3   just drops the broken <img>. Copied into each site by site_transform.py. */
4(function () {
5  function hide(img) {
6    if (img.dataset.romliChecked) return;
7    img.dataset.romliChecked = '1';
8    img.style.display = 'none';
9  }
10  function sweep() {
11    document.querySelectorAll('img').forEach(function (img) {
12      if (img.complete && img.naturalWidth === 0) hide(img);
13    });
14  }
15  document.addEventListener('error', function (e) {
16    if (e.target && e.target.tagName === 'IMG') hide(e.target);
17  }, true);
18  if (document.readyState !== 'loading') sweep();
19  else document.addEventListener('DOMContentLoaded', sweep);
20  window.addEventListener('load', sweep);
21})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.