소스 검색

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

Fix: set default window size
Ahmad Kholid 1 년 전
부모
커밋
757677e874
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  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',
         };