From 6ab3368edf9f5803ff0279134f07fac945b7bdba Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Sun, 12 May 2024 19:55:54 +0800 Subject: [PATCH] deprioritize successful save notifications --- scripts/secretariat.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/secretariat.js b/scripts/secretariat.js index e95e07d..996ae75 100644 --- a/scripts/secretariat.js +++ b/scripts/secretariat.js @@ -178,9 +178,9 @@ class global { let DATA_ALL; // Inform the user that saving is in progress. - (((typeof OPTIONS).includes(`obj`) && OPTIONS != null) ? (!(!!OPTIONS[`silent`])) : true) - ? new logging ((new texts(`saving_current`)).localized, (new texts(`saving_current_message`)).localized, false) - : false; + if (((typeof OPTIONS).includes(`obj`) && OPTIONS != null) ? (!(!!OPTIONS[`silent`])) : true) { + let LOG = new logging ((new texts(`saving_current`)).localized, (new texts(`saving_current_message`)).localized, false) + }; // Get all data and set a blank value if it doesn't exist yet. DATA_ALL = await global.read(null, CLOUD); @@ -203,6 +203,7 @@ class global { // Write! chrome.storage[(CLOUD > 0) ? `sync` : `local`].set(DATA_INJECTED); + (typeof LOG).includes(`undef`) ? false : LOG.clear(); return ((OPTIONS[`verify`] != null ? (OPTIONS[`verify`]) : true) ? verify(DATA_NAME, data) : true); }