Explorar o código

feat: make getActiveTab work with devtools for popup

tophf %!s(int64=5) %!d(string=hai) anos
pai
achega
c037cd5beb
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/common/index.js

+ 1 - 1
src/common/index.js

@@ -145,7 +145,7 @@ export function decodeFilename(filename) {
 export async function getActiveTab() {
   const [tab] = await browser.tabs.query({
     active: true,
-    lastFocusedWindow: true, // also gets incognito windows
+    windowId: -2, // chrome.windows.WINDOW_ID_CURRENT works when debugging the popup in devtools
   });
   return tab;
 }