allow window prefs on mac

This commit is contained in:
Zack Rauen 2018-11-14 20:46:36 -05:00
parent d7fe231f08
commit 932745e88d
2 changed files with 4 additions and 4 deletions

View File

@ -1871,17 +1871,17 @@ var BdApi = {
};
BdApi.getAllWindowPreferences = function() {
if (bdConfig.os !== "win32" || !this.WindowConfigFile) return {}; // Tempfix until new injection on other platforms
if ((bdConfig.os !== "win32" && bdConfig.os !== "darwin") || !this.WindowConfigFile) return {}; // Tempfix until new injection on other platforms
return require(this.WindowConfigFile);
};
BdApi.getWindowPreference = function(key) {
if (bdConfig.os !== "win32" || !this.WindowConfigFile) return undefined; // Tempfix until new injection on other platforms
if ((bdConfig.os !== "win32" && bdConfig.os !== "darwin") || !this.WindowConfigFile) return undefined; // Tempfix until new injection on other platforms
return this.getAllWindowPreferences()[key];
};
BdApi.setWindowPreference = function(key, value) {
if (bdConfig.os !== "win32" || !this.WindowConfigFile) return; // Tempfix until new injection on other platforms
if ((bdConfig.os !== "win32" && bdConfig.os !== "darwin") || !this.WindowConfigFile) return; // Tempfix until new injection on other platforms
const fs = require("fs");
const prefs = this.getAllWindowPreferences();
prefs[key] = value;

2
js/main.min.js vendored

File diff suppressed because one or more lines are too long