From 49b603c7561c1f39cd79c969e00b6069cedb2397 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 14 Mar 2021 22:51:48 -0400 Subject: Remove old settings page (#1524) * Remove old settings page * Remove spinner.gif --- ext/js/background/backend.js | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) (limited to 'ext/js/background') diff --git a/ext/js/background/backend.js b/ext/js/background/backend.js index a2a93375..ff119cf2 100644 --- a/ext/js/background/backend.js +++ b/ext/js/background/backend.js @@ -1945,31 +1945,20 @@ class Backend { } async _openSettingsPage(mode) { - const {useSettingsV2} = this._options.global; const manifest = chrome.runtime.getManifest(); - const url = chrome.runtime.getURL(useSettingsV2 ? manifest.options_ui.page : '/settings-old.html'); + const url = chrome.runtime.getURL(manifest.options_ui.page); switch (mode) { case 'existingOrNewTab': - if (!useSettingsV2) { - const predicate = ({url: url2}) => (url2 !== null && url2.startsWith(url)); - const tab = await this._findTabs(1000, false, predicate, false); - if (tab !== null) { - await this._focusTab(tab); - } else { - await this._createTab(url); - } - } else { - await new Promise((resolve, reject) => { - chrome.runtime.openOptionsPage(() => { - const e = chrome.runtime.lastError; - if (e) { - reject(new Error(e.message)); - } else { - resolve(); - } - }); + await new Promise((resolve, reject) => { + chrome.runtime.openOptionsPage(() => { + const e = chrome.runtime.lastError; + if (e) { + reject(new Error(e.message)); + } else { + resolve(); + } }); - } + }); break; case 'newTab': await this._createTab(url); -- cgit v1.2.3