From 5954116e435891a62823d830dccb7ea1d3f837b2 Mon Sep 17 00:00:00 2001 From: Alan H <879790+feildmaster@users.noreply.github.com> Date: Thu, 25 Apr 2024 22:52:43 -0500 Subject: [PATCH] fix: checkerV2 --- src/checkerV2.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/checkerV2.js b/src/checkerV2.js index bb4aa38..3890afb 100644 --- a/src/checkerV2.js +++ b/src/checkerV2.js @@ -5,8 +5,7 @@ if (!sessionStorage.getItem(key)) { sessionStorage.setItem(key, '1'); // Set instantly to prevent multiple alerts happening const message = "Looks like you don't have UnderScript installed, or you deactivated it! In order for plugins to work, you need to have it up and running. Until then, the features of this userscript will simply not work. Thank you for your understanding."; - - let alerted = true; + if (window.SimpleToast) { SimpleToast({ title: 'Missing Requirements', @@ -27,10 +26,8 @@ }], }); } else { - alerted = false; + sessionStorage.removeItem(key) } - - if (!alerted) sessionStorage.removeItem(key); } throw new Error(`${pluginName}: UnderScript required`);