tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

background.js (439B)


      1 browser.tabs.onActivated.addListener(async tabChange => {
      2  const activeTabs = await browser.tabs.query({ active: true });
      3  const currentWindow = await browser.tabs.query({
      4    currentWindow: true,
      5    active: true,
      6  });
      7 
      8  if (
      9    activeTabs.length === 1 &&
     10    activeTabs[0].id == tabChange.tabId &&
     11    currentWindow.length === 1 &&
     12    currentWindow[0].id === tabChange.tabId
     13  ) {
     14    browser.tabs.remove(tabChange.tabId);
     15  }
     16 });