comparison background.js @ 6:d5f5d016facd

Open search resuls in background when using middle click
author Guido Berhoerster <guido+cws@berhoerster.name>
date Sun, 10 Oct 2021 19:07:11 +0200
parents f77dab12bb52
children
comparison
equal deleted inserted replaced
5:330db83ea497 6:d5f5d016facd
105 info.selectionText.trim() : info.linkText.trim(); 105 info.selectionText.trim() : info.linkText.trim();
106 // create a new tab with the same contextual identity as the current tab 106 // create a new tab with the same contextual identity as the current tab
107 let newTab; 107 let newTab;
108 try { 108 try {
109 newTab = await browser.tabs.create({ 109 newTab = await browser.tabs.create({
110 active: true, 110 active: info.button === 1 ? false : true,
111 cookieStoreId: tab.cookieStoreId, 111 cookieStoreId: tab.cookieStoreId,
112 openerTabId: tab.id 112 openerTabId: tab.id
113 }); 113 });
114 } catch (e) { 114 } catch (e) {
115 console.log(`Failed to create new tab: ${e.message}`); 115 console.log(`Failed to create new tab: ${e.message}`);