Selaa lähdekoodia

feat: make getActiveTab work with devtools for popup

tophf 5 vuotta sitten
vanhempi
sitoutus
c037cd5beb
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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;
 }