From 4dccd4a053d25a62278313401852836aea199592 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sat, 4 Nov 2023 20:06:13 +0200 Subject: [PATCH] Show app loader on start --- public/script.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/script.js b/public/script.js index f3358376f..ae5ec27ea 100644 --- a/public/script.js +++ b/public/script.js @@ -260,7 +260,7 @@ export { } // Cohee: Uncomment when we decide to use loader -// showLoader(); +showLoader(); // Allow target="_blank" in links DOMPurify.addHook('afterSanitizeAttributes', function (node) { @@ -713,6 +713,7 @@ async function firstLoadInit() { const tokenData = await tokenResponse.json(); token = tokenData.token; } catch { + hideLoader(); toastr.error("Couldn't get CSRF token. Please refresh the page.", "Error", { timeOut: 0, extendedTimeOut: 0, preventDuplicates: true }); throw new Error("Initialization failed"); } @@ -734,7 +735,7 @@ async function firstLoadInit() { initCfg(); doDailyExtensionUpdatesCheck(); // Cohee: Uncomment when we decide to use loader - // hideLoader(); + hideLoader(); } function checkOnlineStatus() {