From 09783083257db40187f1012052d016febafd921e Mon Sep 17 00:00:00 2001 From: tophf Date: Sat, 30 Sep 2017 02:40:01 +0300 Subject: [PATCH] openerTabId added in FF57: https://bugzil.la/1238314 --- js/messaging.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/messaging.js b/js/messaging.js index 55809e50..432ba0fd 100644 --- a/js/messaging.js +++ b/js/messaging.js @@ -192,8 +192,10 @@ function openURL({url, currentWindow = true}) { chrome.tabs.update({url}, resolve); } else { // create a new tab - const openerSupported = !FIREFOX && tab && !chromeInIncognito; - const options = openerSupported ? {url, openerTabId: tab.id} : {url}; + const options = {url}; + if (tab && (!FIREFOX || FIREFOX >= 57) && !chromeInIncognito) { + options.openerTabId = tab.id; + } chrome.tabs.create(options, resolve); } });