()
| 89 | } |
| 90 | |
| 91 | function initAvailableSplashes() { |
| 92 | const splashes = document.querySelectorAll('[data-splash]:not([data-splash-ready])'); |
| 93 | splashes.forEach(splash => { |
| 94 | if (initSplash(splash)) { |
| 95 | splash.setAttribute('data-splash-ready', '1'); |
| 96 | } |
| 97 | }); |
| 98 | |
| 99 | if (observer !== null && document.querySelector('[data-splash]:not([data-splash-ready])') === null) { |
| 100 | observer.disconnect(); |
| 101 | observer = null; |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | if (document.readyState !== 'loading') { |
| 106 | initAvailableSplashes(); |