diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-01-24 14:20:17 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-24 14:20:17 -0500 |
commit | a0657e1bab6450095b020fb47b9c09a8ca7b5cdc (patch) | |
tree | d7c727c68d7ac1d66cc6f486a9a53022746017b0 /ext/mixed | |
parent | 4b6bb529523612743ab0086e97b3ca062678bd96 (diff) |
Various firefox fixes (#1306)
* Fix for chrome.commands not being present on Firefox's embedded float.html
* Fix _getSearchContext mishandling _optionsContextOverride
Diffstat (limited to 'ext/mixed')
-rw-r--r-- | ext/mixed/js/hotkey-help-controller.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/mixed/js/hotkey-help-controller.js b/ext/mixed/js/hotkey-help-controller.js index 032573c1..8137b50b 100644 --- a/ext/mixed/js/hotkey-help-controller.js +++ b/ext/mixed/js/hotkey-help-controller.js @@ -83,6 +83,11 @@ class HotkeyHelpController { async _setupGlobalCommands(commandMap) { const commands = await new Promise((resolve, reject) => { + if (!(isObject(chrome.commands) && typeof chrome.commands.getAll === 'function')) { + resolve([]); + return; + } + chrome.commands.getAll((result) => { const e = chrome.runtime.lastError; if (e) { |