Browse Source

Merge pull request #1365 from Siykt/fix/dashboard-dont-open

Fix: set default window size
Ahmad Kholid 1 year ago
parent
commit
757677e874
1 changed files with 3 additions and 2 deletions
  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',
         };