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
| const makeManifest = async (manifest) => { | |
| manifest.description = document.head.children.description?.content; | |
| const icons = await Promise.all(Array.from(document.querySelectorAll(`link[rel$="icon"]`)).map((icon) => new Promise((resolve) => { | |
| const img = new Image() | |
| img.src = icon.href || icon.src; | |
| img.onload = resolve; | |
| img.onerror = () => resolve(null); | |
| }))); | |
| for (let iconLoadEvent of icons) { | |
| if (!iconLoadEvent) continue; |