Fix: removed unused API

This commit is contained in:
eight 2018-10-12 03:48:13 +08:00
parent 1b2c88f926
commit 405b7f8f06

View File

@ -1,6 +1,6 @@
/* global detectSloppyRegexps download prefs openURL FIREFOX CHROME VIVALDI /* global detectSloppyRegexps download prefs openURL FIREFOX CHROME VIVALDI
openEditor debounce URLS ignoreChromeError queryTabs getTab openEditor debounce URLS ignoreChromeError queryTabs getTab
styleManager db msg navigatorUtil iconUtil workerUtil */ styleManager msg navigatorUtil iconUtil workerUtil */
'use strict'; 'use strict';
// eslint-disable-next-line no-var // eslint-disable-next-line no-var
@ -32,9 +32,6 @@ window.API_METHODS = Object.assign(window.API_METHODS || {}, {
}, },
getPrefs: prefs.getAll, getPrefs: prefs.getAll,
// FIXME: who uses this?
healthCheck: () => db.exec().then(() => true),
detectSloppyRegexps, detectSloppyRegexps,
openEditor, openEditor,
@ -47,16 +44,6 @@ window.API_METHODS = Object.assign(window.API_METHODS || {}, {
// in the foreground thus auto-closing the popup (in Chrome) // in the foreground thus auto-closing the popup (in Chrome)
openURL, 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() { optionsCustomizeHotkeys() {
return browser.runtime.openOptionsPage() return browser.runtime.openOptionsPage()
.then(() => new Promise(resolve => setTimeout(resolve, 100))) .then(() => new Promise(resolve => setTimeout(resolve, 100)))