fix: remove the loading time after style loading is successful

This commit is contained in:
Hakadao
2023-12-24 17:25:38 +08:00
parent c6b37b3dfc
commit 262f9f0110

View File

@@ -127,9 +127,7 @@ function injectApp() {
newStyleEl.setAttribute('href', browser.runtime.getURL('dist/contentScripts/style.css'))
document.documentElement.appendChild(newStyleEl)
newStyleEl.onload = () => {
setTimeout(() => {
document.documentElement.removeChild(beforeLoadedStyleEl)
}, 500)
document.documentElement.removeChild(beforeLoadedStyleEl)
}
// inject svg icons