Bladeren bron

fix: default window size

siykt 1 jaar geleden
bovenliggende
commit
ded4bec58e
1 gewijzigde bestanden met toevoegingen van 3 en 2 verwijderingen
  1. 3 2
      src/background/BackgroundUtils.js

+ 3 - 2
src/background/BackgroundUtils.js

@@ -25,11 +25,12 @@ class BackgroundUtils {
           });
         }
       } else {
+        const curWin = await browser.windows.getCurrent();
         const windowOptions = {
           top: 0,
           left: 0,
-          width: 715,
-          height: 715,
+          width: Math.min(curWin.width, 715),
+          height: Math.min(curWin.height, 715),
           url: tabUrl,
           type: 'popup',
         };