| 2396 | } |
| 2397 | |
| 2398 | function reloadIconManifestScript() { |
| 2399 | // `icons/manifest.js` is loaded once at page load; "Refresh" should be able to pick up changes. |
| 2400 | // We inject it again with a cache-busting query. This works for http(s) and typically for file:// too. |
| 2401 | return new Promise((resolve) => { |
| 2402 | const s = document.createElement("script"); |
| 2403 | s.src = `icons/manifest.js?v=${Date.now()}`; |
| 2404 | s.async = true; |
| 2405 | s.onload = () => resolve(true); |
| 2406 | s.onerror = () => resolve(false); |
| 2407 | document.head.appendChild(s); |
| 2408 | }); |
| 2409 | } |
| 2410 | |
| 2411 | function withCacheBust(url) { |
| 2412 | if (!url) return url; |