From 2de9edef73fe41dd0e8d11f1ca52cefc61fe0747 Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Tue, 23 Apr 2024 12:32:52 +0800 Subject: [PATCH] monitoring won't be needed for now, but add custom themes Use tabs instead of windows --- scripts/GUI/windowman.js | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/scripts/GUI/windowman.js b/scripts/GUI/windowman.js index 67128c1..ce73f4b 100644 --- a/scripts/GUI/windowman.js +++ b/scripts/GUI/windowman.js @@ -18,7 +18,7 @@ export default class windowman { }; // Add additional sources. - (OPTIONS[`CSS`] != null) ? ((Array.isArray(OPTIONS[`CSS`])) ? UI[`CSS`] = UI[`CSS`].concat(OPTIONS[`CSS`]) : UI[`CSS`].push(OPTIONS[`CSS`])) : null; + (OPTIONS) ? ((OPTIONS[`CSS`] != null) ? ((Array.isArray(OPTIONS[`CSS`])) ? UI[`CSS`] = UI[`CSS`].concat(OPTIONS[`CSS`]) : UI[`CSS`].push(OPTIONS[`CSS`])) : null) : null; (UI[`CSS`]).forEach(async (source) => { try { @@ -254,20 +254,11 @@ export default class windowman { actions(); } - ((OPTIONS != null && (typeof OPTIONS).includes(`obj`) && !Array.isArray(OPTIONS)) ? OPTIONS[`monitor`] : true) ? this.monitor() : null; - headers(((OPTIONS != null && typeof OPTIONS == `object`) ? OPTIONS[`headers`] : false)? OPTIONS[`headers`] : {}); + headers(((OPTIONS != null && typeof OPTIONS == `object`) ? OPTIONS[`headers`] : false)? OPTIONS[`headers`] : null); appearance(); events(); } - /* Send monitoring events, useful to determining whether the window is opened or closed. - - @param {string} MESSAGE_NAME Custom message name - */ - monitor() { - chrome.runtime.connect({name: `view=${window.location.href}`}); - }; - /* Run this function if you would like to synchronize with data. */ async sync() { // Import the module.