This commit is contained in:
Mirco Wittrien 2020-09-20 13:29:55 +02:00
parent f5232a30ff
commit 10cf53c3a6
3 changed files with 18 additions and 17 deletions

View File

@ -5,7 +5,7 @@ module.exports = (_ => {
"info": {
"name": "BDFDB",
"author": "DevilBro",
"version": "1.0.0",
"version": "1.0.1",
"description": "Gives other plugins utility functions."
},
"rawUrl": "https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js",
@ -4013,12 +4013,16 @@ module.exports = (_ => {
BDFDB.LogUtils.warn(DiscordClasses[item][0] + " not found in DiscordClassModules");
return className;
}
else if (DiscordClassModules[DiscordClasses[item][0]][DiscordClasses[item][1]] === undefined) {
else if ([DiscordClasses[item][1]].flat().every(prop => DiscordClassModules[DiscordClasses[item][0]][prop] === undefined)) {
BDFDB.LogUtils.warn(DiscordClasses[item][1] + " not found in " + DiscordClasses[item][0] + " in DiscordClassModules");
return className;
}
else {
className = DiscordClassModules[DiscordClasses[item][0]][DiscordClasses[item][1]];
for (let prop of [DiscordClasses[item][1]].flat()) {
className = DiscordClassModules[DiscordClasses[item][0]][prop];
if (className) break;
else className = DiscordClassModules.BDFDB.BDFDBundefined;
}
if (selector) {
className = className.split(" ").filter(n => n.indexOf("da-") != 0).join(selector ? "." : " ");
className = className || DiscordClassModules.BDFDB.BDFDBundefined;

View File

@ -1997,32 +1997,32 @@
"nitrostore": ["NitroStore", "applicationStore"],
"nochannel": ["ChatWindow", "noChannel"],
"notice": ["Notice", "notice"],
"noticebrand": ["Notice", "noticeBrand"],
"noticebrand": ["Notice", ["noticeBrand", "colorBrand"]],
"noticebutton": ["Notice", "button"],
"noticecustom": ["Notice", "colorCustom"],
"noticedanger": ["Notice", "noticeDanger"],
"noticedanger": ["Notice", ["noticeDanger", "colorDanger"]],
"noticedark": ["Notice", "colorDark"],
"noticedefault": ["Notice", "noticeDefault"],
"noticedownload": ["Notice", "noticeDownload"],
"noticedefault": ["Notice", ["noticeDefault", "colorDefault"]],
"noticedownload": ["Notice", ["noticeDownload", "colorDownload"]],
"noticedismiss": ["Notice", "dismiss"],
"noticeicon": ["NoticePlatform", "icon"],
"noticeiconandroid": ["NoticePlatform", "iconAndroid"],
"noticeiconapple": ["NoticePlatform", "iconApple"],
"noticeiconwindows": ["NoticePlatform", "iconWindows"],
"noticeinfo": ["Notice", "noticeInfo"],
"noticeinfo": ["Notice", ["noticeInfo", "colorInfo"]],
"noticeneutral": ["Notice", "colorNeutral"],
"noticenotification": ["Notice", "noticeNotification"],
"noticeplatformicon": ["Notice", "platformIcon"],
"noticepremium": ["Notice", "noticePremium"],
"noticenotification": ["Notice", ["noticeNotification", "colorNotification"]],
"noticeplatformicon": ["NoticePlatform", "platformIcon"],
"noticepremium": ["Notice", ["noticePremium", "colorPremium"]],
"noticepremiumaction": ["NoticePlatform", "premiumAction"],
"noticepremiumicon": ["NoticePlatform", "premiumIcon"],
"noticepremiumlogo": ["NoticePlatform", "premiumLogo"],
"noticepremiumtext": ["NoticePlatform", "premiumText"],
"noticepremiumtier1": ["Notice", "noticePremiumTier1"],
"noticepremiumtier2": ["Notice", "noticePremiumTier2"],
"noticespotify": ["Notice", "noticeSpotify"],
"noticestreamer": ["Notice", "noticeStreamerMode"],
"noticesuccess": ["Notice", "noticeSuccess"],
"noticespotify": ["Notice", ["noticeSpotify", "colorSpotify"]],
"noticestreamer": ["Notice", ["noticeStreamerMode", "colorStreamerMode"]],
"noticesuccess": ["Notice", ["noticeSuccess", "colorSuccess"]],
"noticetextlink": ["NoticePlatform", "textLink"],
"noticewrapper": ["BDFDB", "noticeWrapper"],
"note": ["SettingsItems", "note"],

View File

@ -724,9 +724,6 @@ img:not([src]), img[src=""], img[src="null"] {
[REPLACE_CLASS_noticewrapper] [REPLACE_CLASS_noticeplatformicon] svg {
max-height: 28px;
}
[REPLACE_CLASS_noticesurvey] {
background-color: #222;
}
.platform-osx [REPLACE_CLASS_noticewrapper] ~ * [REPLACE_CLASS_guildswrapper] {
margin-top: 0;