From e5cd04c95d87d3879c3a4f80fe09ea237a813aee Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Mon, 6 May 2024 09:48:19 +0800 Subject: [PATCH] improve formatting of global save failure message through spaces --- scripts/secretariat.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/secretariat.js b/scripts/secretariat.js index fab0486..12e678a 100644 --- a/scripts/secretariat.js +++ b/scripts/secretariat.js @@ -167,7 +167,7 @@ class global { DATA_CHECK[`state`] = await compare([...NAME], DATA); (!DATA_CHECK[`state`]) - ? logging.error((new texts(`error_msg_save_failed`)).localized, NAME.join(`→`), JSON.stringify(DATA)) + ? logging.error((new texts(`error_msg_save_failed`)).localized, NAME.join(` → `), JSON.stringify(DATA)) : ((((typeof OPTIONS).includes(`obj`) && OPTIONS != null) ? (!(!!OPTIONS[`silent`])) : true) ? new logging (new texts(`saving_done`).localized) : false); @@ -203,7 +203,7 @@ class global { // Write! chrome.storage[(CLOUD > 0) ? `sync` : `local`].set(DATA_INJECTED); - return (verify(DATA_NAME, data)); + return ((OPTIONS[`verify`] != null ? (OPTIONS[`verify`]) : true) ? verify(DATA_NAME, data) : true); } /* @@ -239,7 +239,7 @@ class global { return(global.read([...PATH], cloud).then(async (DATA) => { return((DATA != null) // Then erase the data. - ? await global.write(PATH, null, cloud, {"strict": true}) + ? await global.write(PATH, null, cloud, {"strict": true, "verify": false}) : true); })); };