From 0420a29d77e7e91a87f8f70623e1dff067640fd8 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Mon, 18 Jan 2021 14:22:48 -0500 Subject: Command refactor (#1271) * Change selectors * Change openHelpPage to openInfoPage --- ext/bg/js/backend.js | 4 ++-- ext/bg/js/context-main.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'ext/bg/js') diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js index d83942c0..a426d04c 100644 --- a/ext/bg/js/backend.js +++ b/ext/bg/js/backend.js @@ -132,7 +132,7 @@ class Backend { this._commandHandlers = new Map([ ['toggleTextScanning', this._onCommandToggleTextScanning.bind(this)], - ['openHelpPage', this._onCommandOpenHelpPage.bind(this)], + ['openInfoPage', this._onCommandOpenInfoPage.bind(this)], ['openSettingsPage', this._onCommandOpenSettingsPage.bind(this)], ['openSearchPage', this._onCommandOpenSearchPage.bind(this)], ['openPopupWindow', this._onCommandOpenPopupWindow.bind(this)] @@ -774,7 +774,7 @@ class Backend { } } - async _onCommandOpenHelpPage() { + async _onCommandOpenInfoPage() { await this._openInfoPage(); } diff --git a/ext/bg/js/context-main.js b/ext/bg/js/context-main.js index 1d15a81b..839b534e 100644 --- a/ext/bg/js/context-main.js +++ b/ext/bg/js/context-main.js @@ -30,13 +30,13 @@ class DisplayController { this._showExtensionInfo(manifest); this._setupEnvironment(); this._setupButtonEvents('.action-open-search', 'openSearchPage', chrome.runtime.getURL('/bg/search.html')); - this._setupButtonEvents('.action-open-help', 'openHelpPage', chrome.runtime.getURL('/bg/info.html')); + this._setupButtonEvents('.action-open-info', 'openInfoPage', chrome.runtime.getURL('/bg/info.html')); const optionsFull = await api.optionsGetFull(); this._optionsFull = optionsFull; const optionsPageUrl = optionsFull.global.useSettingsV2 ? '/bg/settings2.html' : manifest.options_ui.page; - this._setupButtonEvents('.action-open-options', 'openSettingsPage', chrome.runtime.getURL(optionsPageUrl)); + this._setupButtonEvents('.action-open-settings', 'openSettingsPage', chrome.runtime.getURL(optionsPageUrl)); const {profiles, profileCurrent} = optionsFull; const primaryProfile = (profileCurrent >= 0 && profileCurrent < profiles.length) ? profiles[profileCurrent] : null; -- cgit v1.2.3