Appease codefactor

This commit is contained in:
Jaxon Lewis-Wilson
2026-01-27 14:40:02 +08:00
parent 8791038bcf
commit 2c0f48877f
+10 -11
View File
@@ -50,16 +50,6 @@ async function init() {
documentLoadStyle.textContent = documentLoadCSS; documentLoadStyle.textContent = documentLoadCSS;
document.head.appendChild(documentLoadStyle); document.head.appendChild(documentLoadStyle);
function replaceIcons() {
document
.querySelectorAll<HTMLLinkElement>('link[rel*="icon"]')
.forEach((link) => {
if (link.href !== icon48) {
link.href = icon48;
}
});
}
replaceIcons(); replaceIcons();
const observer = new MutationObserver(() => { const observer = new MutationObserver(() => {
@@ -73,7 +63,6 @@ async function init() {
attributeFilter: ["href", "rel"], attributeFilter: ["href", "rel"],
}); });
try { try {
await initializeSettingsState(); await initializeSettingsState();
@@ -102,3 +91,13 @@ async function init() {
} }
} }
} }
function replaceIcons() {
document
.querySelectorAll<HTMLLinkElement>('link[rel*="icon"]')
.forEach((link) => {
if (link.href !== icon48) {
link.href = icon48;
}
});
}