You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When opening multiple tabs in a row, there's a difference in behavior between the "open link in new tab" tab from Firefox's context menu and FoxyGestures' "Open Link in New Background Tab".
Imagine a website with 2 links. I open each link in a new tab with right click -> open link in new tab, creating the 2 tabs New Tab 1, and New Tab 2. I activate New Tab 1. If I now close this tab, Firefox automatically activates New Tab 2. However, if the tabs had been opened by FoxyGestures' "Open Link in New Background Tab" gesture, closing New Tab 1 would put me back on the original tab.
Is it possible to emulate Firefox's behavior, where it cycles through the new tabs instead of putting you back where you came from?
The text was updated successfully, but these errors were encountered:
consturl=data.element&&data.element.linkHref;if(url){executeInBackground(async(url)=>{// If this is the first time this script is executed, initialize some stuffif(window._lastOpenedTabId===undefined){window._lastOpenedTabId=newMap();window._successorTabId=newMap();// When a tab is closed, activate the next onebrowser.tabs.onRemoved.addListener(function(tabId){if(!window._successorTabId.has(tabId)){return;}constsuccessorTabId=window._successorTabId.get(tabId);browser.tabs.update(successorTabId,{active: true});});}constopenerTab=(awaitbrowser.tabs.query({active: true}))[0];constlastOpenedTabId=window._lastOpenedTabId.get(openerTab.id);letnewTabIndex=openerTab.index+1;if(lastOpenedTabId!==undefined){try{constlastOpenedTab=awaitbrowser.tabs.get(lastOpenedTabId);newTabIndex=lastOpenedTab.index+1;}catch(error){// That tab has been closed}}constnewTab=awaitbrowser.tabs.create({url: url,active: false,index: newTabIndex,openerTabId: openerTab.id,});window._lastOpenedTabId.set(openerTab.id,newTab.id);if(lastOpenedTabId!==undefined){window._successorTabId.set(lastOpenedTabId,newTab.id);}},[url]);}
When opening multiple tabs in a row, there's a difference in behavior between the "open link in new tab" tab from Firefox's context menu and FoxyGestures' "Open Link in New Background Tab".
Imagine a website with 2 links. I open each link in a new tab with
right click -> open link in new tab
, creating the 2 tabsNew Tab 1
, andNew Tab 2
. I activateNew Tab 1
. If I now close this tab, Firefox automatically activatesNew Tab 2
. However, if the tabs had been opened by FoxyGestures' "Open Link in New Background Tab" gesture, closingNew Tab 1
would put me back on the original tab.Is it possible to emulate Firefox's behavior, where it cycles through the new tabs instead of putting you back where you came from?
The text was updated successfully, but these errors were encountered: