Update 0BDFDB.plugin.js
This commit is contained in:
parent
2b83582223
commit
ba5d9505b3
|
@ -2,7 +2,7 @@
|
||||||
* @name BDFDB
|
* @name BDFDB
|
||||||
* @author DevilBro
|
* @author DevilBro
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @version 2.0.3
|
* @version 2.0.4
|
||||||
* @description Required Library for DevilBro's Plugins
|
* @description Required Library for DevilBro's Plugins
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https://www.paypal.me/MircoWittrien
|
||||||
|
@ -19,7 +19,7 @@ module.exports = (_ => {
|
||||||
"info": {
|
"info": {
|
||||||
"name": "BDFDB",
|
"name": "BDFDB",
|
||||||
"author": "DevilBro",
|
"author": "DevilBro",
|
||||||
"version": "2.0.3",
|
"version": "2.0.4",
|
||||||
"description": "Required Library for DevilBro's Plugins"
|
"description": "Required Library for DevilBro's Plugins"
|
||||||
},
|
},
|
||||||
"rawUrl": `https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js`
|
"rawUrl": `https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js`
|
||||||
|
@ -4297,12 +4297,17 @@ module.exports = (_ => {
|
||||||
return BDFDB.DiscordUtils.getSettings("messageDisplayCompact") ? "compact" : "cozy";
|
return BDFDB.DiscordUtils.getSettings("messageDisplayCompact") ? "compact" : "cozy";
|
||||||
};
|
};
|
||||||
BDFDB.DiscordUtils.getSettings = function (key) {
|
BDFDB.DiscordUtils.getSettings = function (key) {
|
||||||
if (!key || !LibraryModules.SettingsUtils || (!LibraryModules.SettingsUtils[key] && !LibraryModules.SettingsUtils[key + "DoNotUseYet"])) return null;
|
if (!key) return null;
|
||||||
return (LibraryModules.SettingsUtils[key] || LibraryModules.SettingsUtils[key + "DoNotUseYet"]).getSetting();
|
else if (LibraryModules.SettingsUtils && (LibraryModules.SettingsUtils[key] || LibraryModules.SettingsUtils[key + "DoNotUseYet"])) return (LibraryModules.SettingsUtils[key] || LibraryModules.SettingsUtils[key + "DoNotUseYet"]).getSetting();
|
||||||
|
else {
|
||||||
|
const value = BDFDB.LibraryModules.SettingsStore.getAllSettings()[key.slice(0, 1).toLowerCase() + key.slice(1)];
|
||||||
|
return value != undefined ? value: null;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
BDFDB.DiscordUtils.setSettings = function (key, value) {
|
BDFDB.DiscordUtils.setSettings = function (key, value) {
|
||||||
if (!key || !LibraryModules.SettingsUtils || (!LibraryModules.SettingsUtils[key] && !LibraryModules.SettingsUtils[key + "DoNotUseYet"])) return;
|
if (!key) return;
|
||||||
(LibraryModules.SettingsUtils[key] || LibraryModules.SettingsUtils[key + "DoNotUseYet"]).updateSetting(value);
|
else if (LibraryModules.SettingsUtils && (LibraryModules.SettingsUtils[key] || LibraryModules.SettingsUtils[key + "DoNotUseYet"])) (LibraryModules.SettingsUtils[key] || LibraryModules.SettingsUtils[key + "DoNotUseYet"]).updateSetting(value);
|
||||||
|
else BDFDB.LibraryModules.SettingsUtilsOld.updateRemoteSettings({[key.slice(0, 1).toLowerCase() + key.slice(1)]: value});
|
||||||
};
|
};
|
||||||
BDFDB.DiscordUtils.getZoomFactor = function () {
|
BDFDB.DiscordUtils.getZoomFactor = function () {
|
||||||
let aRects = BDFDB.DOMUtils.getRects(document.querySelector(BDFDB.dotCN.appmount));
|
let aRects = BDFDB.DOMUtils.getRects(document.querySelector(BDFDB.dotCN.appmount));
|
||||||
|
|
Loading…
Reference in New Issue