Skip to content

Commit

Permalink
fix: hidden window if not maximized
Browse files Browse the repository at this point in the history
  • Loading branch information
KraXen72 committed May 25, 2023
1 parent cf1f364 commit d02f15d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const settingsSkeleton = {
hideAds: true,
hideReCaptcha: true,
menuTimer: false,
quickClassPicker: false,
fullscreen: 'windowed', // windowed, maximized, fullscreen, borderless
resourceSwapper: true,
userscripts: false,
Expand Down Expand Up @@ -234,6 +235,7 @@ app.on('ready', () => {
// general ready to show, runs when window refreshes or loads url
mainWindow.on('ready-to-show', () => {
if (userPrefs.fullscreen === 'maximized' && !mainWindow.isMaximized()) mainWindow.maximize();
if (!mainWindow.isVisible()) mainWindow.show()
if (mainWindow.webContents.getURL().endsWith('dummy.html')) { mainWindow.loadURL('https://krunker.io'); return; }

mainWindow.webContents.send('checkForUpdates', app.getVersion());
Expand Down

0 comments on commit d02f15d

Please sign in to comment.