mirror of
https://github.com/QwIT-Development/firka-extension.git
synced 2026-06-12 03:41:39 +02:00
Fix loading remove
This commit is contained in:
@@ -65,8 +65,18 @@
|
||||
}
|
||||
|
||||
if (document.readyState === "loading") {
|
||||
document.addEventListener("DOMContentLoaded", transformLogoutPage);
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
setTimeout(() => {
|
||||
if (typeof loadingScreen !== 'undefined') {
|
||||
loadingScreen.hide();
|
||||
}
|
||||
}, 100);
|
||||
transformLogoutPage();
|
||||
});
|
||||
} else {
|
||||
if (typeof loadingScreen !== 'undefined') {
|
||||
loadingScreen.hide();
|
||||
}
|
||||
transformLogoutPage();
|
||||
}
|
||||
})();
|
||||
@@ -65,7 +65,13 @@ window.addEventListener("DOMContentLoaded", () => {
|
||||
});
|
||||
}
|
||||
|
||||
if (urls.some((url) => url.includes(location.pathname))) {
|
||||
const currentUrl = location.href;
|
||||
const shouldShowLoading = urls.some((urlPattern) => {
|
||||
const regex = new RegExp(urlPattern.replace(/\*/g, '.*'));
|
||||
return regex.test(currentUrl);
|
||||
});
|
||||
|
||||
if (shouldShowLoading) {
|
||||
loadingScreen.show();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user