From 9ff1a14e0e20a6779bee4c0bfe78a8019f871316 Mon Sep 17 00:00:00 2001 From: Karskaja Date: Sat, 19 Oct 2019 08:12:51 -0400 Subject: [PATCH] Fix issue #1041- [Feature request] Open previously hidden tabs in the background Add 'noload' property to openNewTab options, add 'discarded' parameter to browser.tabs.create. New tabs opened from showTabs will be discarded. --- src/js/background/backgroundLogic.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/js/background/backgroundLogic.js b/src/js/background/backgroundLogic.js index 52d61a2..ee1bd22 100644 --- a/src/js/background/backgroundLogic.js +++ b/src/js/background/backgroundLogic.js @@ -55,6 +55,7 @@ const backgroundLogic = { let url = options.url || undefined; const userContextId = ("userContextId" in options) ? options.userContextId : 0; const active = ("nofocus" in options) ? options.nofocus : true; + const discarded = ("noload" in options) ? options.noload : false; const cookieStoreId = backgroundLogic.cookieStoreId(userContextId); // Autofocus url bar will happen in 54: https://bugzilla.mozilla.org/show_bug.cgi?id=1295072 @@ -71,6 +72,7 @@ const backgroundLogic = { return browser.tabs.create({ url, active, + discarded, pinned: options.pinned || false, cookieStoreId }); @@ -313,6 +315,7 @@ const backgroundLogic = { userContextId: userContextId, url: object.url, nofocus: options.nofocus || false, + noload: true, pinned: object.pinned, })); }