diff options
| author | mrmr1993 | 2017-02-08 18:19:03 +0000 |
|---|---|---|
| committer | mrmr1993 | 2017-04-16 15:24:15 +0100 |
| commit | 1d9a5b4935d6cab867ab44d0d8265738c37ce988 (patch) | |
| tree | 92be7bc09eb0f290918cd6aa8ec5d21782061772 /background_scripts/main.coffee | |
| parent | 905fc2d147d1bc656c9e9fec74cda364a686d638 (diff) | |
| download | vimium-1d9a5b4935d6cab867ab44d0d8265738c37ce988.tar.bz2 | |
Workaround type error for unsupported openerTabId in FF
Diffstat (limited to 'background_scripts/main.coffee')
| -rw-r--r-- | background_scripts/main.coffee | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index 70739eae..4fb754f8 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -101,8 +101,13 @@ TabOperations = index: request.tab.index + 1 active: true windowId: request.tab.windowId - openerTabId: request.tab.id - chrome.tabs.create tabConfig, callback + chrome.tabs.create tabConfig, (tab) -> + # NOTE(mrmr1993, 2017-02-08): Firefox currently doesn't support openerTabId (issue 1238314) and throws + # a type error if it is present. We work around this by attempting to set it separately from creating + # the tab. + try chrome.tabs.update tab.id, { openerTabId : request.tab.id }, callback + catch + callback.apply this, arguments toggleMuteTab = do -> muteTab = (tab) -> chrome.tabs.update tab.id, {muted: !tab.mutedInfo.muted} |
