override window preferences

This commit is contained in:
Jean Ouina 2020-05-22 20:04:35 +02:00
parent 6573700e6d
commit 4422416514
4 changed files with 8 additions and 7 deletions

File diff suppressed because one or more lines are too long

View File

@ -12,7 +12,7 @@ export const bbdChangelog = {
"**LightCord** is now using BandagedBD. That means all plugins you were using can be used too !",
"**Window Transparency** changes were made to more compatible with external window managers and addons like Glasscord.",
"Initialization sequence has once again been changed slightly to hopefully improve loading times.",
"We removed emotes. That's sad for people who were actually using it, but it was leading to problems like this https://github.com/rauenzi/BetterDiscordApp/issues/348."
"We removed emotes. That's sad for people who were actually using it, but it was leading to more loading time and some basic words were emote."
]
},
{

View File

@ -15,19 +15,19 @@ export default class Utils {
static getAllWindowPreferences() {
return {
transparent: settingsCookie["fork-wp-1"] || settingsCookie.transparency,
transparent: true,
frame: settingsCookie.frame
};
}
static getWindowPreference(key) {
if (key === "transparent") return settingsCookie["fork-wp-1"] || settingsCookie.transparency;
if (key === "transparent") return true;
if (key === "frame") return settingsCookie.frame;
return null;
}
static setWindowPreference(key, value) {
if (key === "transparent") return settingsCookie["fork-wp-1"] = settingsCookie.transparency = value;
if (key === "transparent") return true;
if (key === "frame") return settingsCookie.frame = value;
return null;
}

View File

@ -22,7 +22,8 @@ module.exports = {
yauzl: `yauzl`,
mkdirp: `mkdirp`,
request: `request`,
"node-fetch": "node-fetch"
"node-fetch": "node-fetch",
"glasstron": "glasstron"
},
resolve: {
extensions: [".js", ".jsx"],