From 405b7f8f06968b1f588a6bdb45dfbaeb0b07305b Mon Sep 17 00:00:00 2001 From: eight Date: Fri, 12 Oct 2018 03:48:13 +0800 Subject: [PATCH] Fix: removed unused API --- background/background.js | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/background/background.js b/background/background.js index 4e66bf11..7c8e4df1 100644 --- a/background/background.js +++ b/background/background.js @@ -1,6 +1,6 @@ /* global detectSloppyRegexps download prefs openURL FIREFOX CHROME VIVALDI openEditor debounce URLS ignoreChromeError queryTabs getTab - styleManager db msg navigatorUtil iconUtil workerUtil */ + styleManager msg navigatorUtil iconUtil workerUtil */ 'use strict'; // eslint-disable-next-line no-var @@ -32,9 +32,6 @@ window.API_METHODS = Object.assign(window.API_METHODS || {}, { }, getPrefs: prefs.getAll, - // FIXME: who uses this? - healthCheck: () => db.exec().then(() => true), - detectSloppyRegexps, openEditor, @@ -47,16 +44,6 @@ window.API_METHODS = Object.assign(window.API_METHODS || {}, { // in the foreground thus auto-closing the popup (in Chrome) openURL, - // FIXME: who use this? - closeTab: (msg, sender, respond) => { - chrome.tabs.remove(msg.tabId || sender.tab.id, () => { - if (chrome.runtime.lastError && msg.tabId !== sender.tab.id) { - respond(new Error(chrome.runtime.lastError.message)); - } - }); - return true; - }, - optionsCustomizeHotkeys() { return browser.runtime.openOptionsPage() .then(() => new Promise(resolve => setTimeout(resolve, 100)))