Update browserwindow.js

This commit is contained in:
DaBluLite 2022-10-21 08:01:58 +03:00 committed by GitHub
parent 7442dde2fa
commit 31cecae336
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 5 deletions

View File

@ -15,10 +15,8 @@ class BrowserWindow extends electron.BrowserWindow {
options.transparent = true;
options.backgroundColor = "#00000000";
}
// Only affect frame if it is *explicitly* set
// const shouldHaveFrame = BetterDiscord.getSetting("window", "frame");
// if (typeof(shouldHaveFrame) === "boolean") options.frame = shouldHaveFrame;
const shouldHaveFrame = BetterDiscord.getSetting("window", "frame");
if (typeof(shouldHaveFrame) === "boolean") options.frame = shouldHaveFrame;
super(options);
this.__originalPreload = originalPreload;
@ -34,4 +32,4 @@ export default class {
delete __non_webpack_require__.cache[electronPath].exports; // If it didn't work, try to delete existing
__non_webpack_require__.cache[electronPath].exports = {...electron, BrowserWindow}; // Try to assign again after deleting
}
}
}