diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-01-16 11:33:34 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-16 11:33:34 -0500 |
commit | f7c3b0010c9c65b418b46bc87bc5e1f321cd94e0 (patch) | |
tree | efb7aaed4fae1dc1f532ce255be5cef8103ece6d /ext/bg/js/context-main.js | |
parent | 8766744aa4a94193dd03bba39086e4522914e8ef (diff) |
Update extension shortcuts (#1246)
* Update commands
* Add command to open the popup window
Diffstat (limited to 'ext/bg/js/context-main.js')
-rw-r--r-- | ext/bg/js/context-main.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/bg/js/context-main.js b/ext/bg/js/context-main.js index 4db0f096..1d15a81b 100644 --- a/ext/bg/js/context-main.js +++ b/ext/bg/js/context-main.js @@ -29,14 +29,14 @@ class DisplayController { this._showExtensionInfo(manifest); this._setupEnvironment(); - this._setupButtonEvents('.action-open-search', 'search', chrome.runtime.getURL('/bg/search.html')); - this._setupButtonEvents('.action-open-help', 'help', chrome.runtime.getURL('/bg/info.html')); + this._setupButtonEvents('.action-open-search', 'openSearchPage', chrome.runtime.getURL('/bg/search.html')); + this._setupButtonEvents('.action-open-help', 'openHelpPage', 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', 'options', chrome.runtime.getURL(optionsPageUrl)); + this._setupButtonEvents('.action-open-options', 'openSettingsPage', chrome.runtime.getURL(optionsPageUrl)); const {profiles, profileCurrent} = optionsFull; const primaryProfile = (profileCurrent >= 0 && profileCurrent < profiles.length) ? profiles[profileCurrent] : null; @@ -92,7 +92,7 @@ class DisplayController { _setupOptions({options}) { const extensionEnabled = options.general.enable; - const onToggleChanged = () => api.commandExec('toggle'); + const onToggleChanged = () => api.commandExec('toggleTextScanning'); for (const toggle of document.querySelectorAll('#enable-search,#enable-search2')) { toggle.checked = extensionEnabled; toggle.addEventListener('change', onToggleChanged, false); |