stuff
This commit is contained in:
parent
5e1d9f46a0
commit
794d5f36fc
|
@ -2,7 +2,7 @@
|
|||
* @name BDFDB
|
||||
* @author DevilBro
|
||||
* @authorId 278543574059057154
|
||||
* @version 1.9.2
|
||||
* @version 1.9.3
|
||||
* @description Required Library for DevilBro's Plugins
|
||||
* @invite Jx3TjNS
|
||||
* @donate https://www.paypal.me/MircoWittrien
|
||||
|
@ -19,16 +19,10 @@ module.exports = (_ => {
|
|||
"info": {
|
||||
"name": "BDFDB",
|
||||
"author": "DevilBro",
|
||||
"version": "1.9.2",
|
||||
"version": "1.9.3",
|
||||
"description": "Required Library for DevilBro's Plugins"
|
||||
},
|
||||
"rawUrl": `https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js`,
|
||||
"changeLog": {
|
||||
"fixed": {
|
||||
"Server Changes AGAIN": "Fixed Stuff for anything changing Servers",
|
||||
"BD Browser": "Fixed compartibility issues"
|
||||
}
|
||||
}
|
||||
"rawUrl": `https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js`
|
||||
};
|
||||
|
||||
const DiscordObjects = {};
|
||||
|
@ -2136,6 +2130,7 @@ module.exports = (_ => {
|
|||
subComponent: InternalData.ModuleUtilsConfig.Finder[unmappedType] && InternalData.ModuleUtilsConfig.Finder[unmappedType].subComponent,
|
||||
forceObserve: InternalData.ModuleUtilsConfig.ForceObserve.includes(unmappedType),
|
||||
exported: InternalData.ModuleUtilsConfig.Finder[unmappedType] && InternalData.ModuleUtilsConfig.Finder[unmappedType].exported || false,
|
||||
path: InternalData.ModuleUtilsConfig.Finder[unmappedType] && InternalData.ModuleUtilsConfig.Finder[unmappedType].path,
|
||||
mapped: InternalData.ModuleUtilsConfig.PatchMap[type]
|
||||
};
|
||||
config.nonRender = config.specialFilter || BDFDB.ObjectUtils.toArray(pluginData.patchTypes).flat(10).filter(n => n && !InternalData.ModuleUtilsConfig.InstanceFunctions.includes(n)).length > 0;
|
||||
|
@ -2154,6 +2149,7 @@ module.exports = (_ => {
|
|||
let patchSpecial = (func, argument) => {
|
||||
let module = BDFDB.ModuleUtils[func](argument, config.exported);
|
||||
let exports = module && !config.exported && module.exports || module;
|
||||
exports = config.path && BDFDB.ObjectUtils.get(exports, config.path) || exports;
|
||||
exports && InternalBDFDB.patchComponent(pluginData, InternalBDFDB.isMemoOrForwardRef(exports) ? exports.default : exports, mappedType, config);
|
||||
};
|
||||
if (config.classNames.length) InternalBDFDB.checkForInstance(pluginData, mappedType, config);
|
||||
|
@ -2899,7 +2895,7 @@ module.exports = (_ => {
|
|||
}
|
||||
}
|
||||
function check (instance) {
|
||||
if (!instance) return false;
|
||||
if (!instance || instance == parent) return false;
|
||||
let props = instance.stateNode ? instance.stateNode.props : instance.props;
|
||||
return instance.type && config.name && config.name.some(name => BDFDB.ReactUtils.isCorrectInstance(instance, name)) || config.key && config.key.some(key => instance.key == key) || props && config.props && config.props[config.someProps ? "some" : "every"](prop => BDFDB.ArrayUtils.is(prop) ? (BDFDB.ArrayUtils.is(prop[1]) ? prop[1].some(checkValue => propCheck(props, prop[0], checkValue)) : propCheck(props, prop[0], prop[1])) : props[prop] !== undefined) || config.filter && config.filter(instance);
|
||||
}
|
||||
|
|
|
@ -201,14 +201,14 @@
|
|||
"ChannelTextAreaForm": {"class": "chatform"},
|
||||
"ChannelWindow": {"class": "chatcontent"},
|
||||
"ChatMessage": {"strings": ["childrenMessageContent", "childrenRepliedMessage", "message.id"]},
|
||||
"CircleIconButton": {"class": "guildbuttoninner"},
|
||||
"CircleIconButton": {"strings": ["className", ".default.circleIconButton"]},
|
||||
"CustomStatusModal": {"class": "customstatusmodal"},
|
||||
"DirectMessage": {"class": "guildouter"},
|
||||
"EmojiPicker": {"strings": ["EMOJI_PICKER_TAB_PANEL_ID", "diversitySelector"]},
|
||||
"FocusRing": {"props": ["FocusRingScope"]},
|
||||
"GuestHomeButton": {"props": ["GuestHomeButton"]},
|
||||
"Guild": {"subComponent": {"type": "default", "name": "ConnectedGuild"}},
|
||||
"GuildFolder": {"props": ["GuildFolderComponent"]},
|
||||
"GuildFolder": {"props": ["GuildFolderComponent"], "path": "GuildFolderComponent.type"},
|
||||
"GuildIcon": {"class": "avataricon"},
|
||||
"GuildRoleSettings": {"class": "settingswindowcontentregion"},
|
||||
"Guilds": {"subComponent": {"type": "type", "children": true, "strings": ["guildsnav", "ListNavigatorProvider"]}},
|
||||
|
@ -217,7 +217,7 @@
|
|||
"GuildSettingsEmoji": {"class": "guildsettingsemojicard"},
|
||||
"GuildSettingsMembers": {"class": "guildsettingsmembercard"},
|
||||
"GuildSidebar": {"class": "guildchannels"},
|
||||
"HomeButton": {"strings": ["showDMsOnly", "DefaultHomeButton"]},
|
||||
"HomeButton": {"subComponent": {"type": "default", "strings": ["showDMsOnly", "DefaultHomeButton"]}},
|
||||
"I18nLoaderWrapper": {"class": "app"},
|
||||
"InstantInviteModal": {"class": "invitemodalwrapper"},
|
||||
"InvitationCard": {"class": "invitemodalinviterow"},
|
||||
|
@ -228,7 +228,7 @@
|
|||
"Message": {"strings": ["childrenMessageContent", "childrenRepliedMessage", "zalgo"]},
|
||||
"MessageHeader": {"strings": ["ANIMATE_CHAT_AVATAR", "showUsernamePopout"]},
|
||||
"Messages": {"strings": ["group-spacing-", "canManageMessages"]},
|
||||
"MessageUsername": {"strings": ["default.username", "colorString", "compact"]},
|
||||
"MessageUsername": {"strings": [".default.username", "colorString", "compact"]},
|
||||
"ModalLayer": {"class": "layermodal"},
|
||||
"Note": {"class": "usernotetextarea"},
|
||||
"PeoplePageList": {"strings": ["FriendsSections", "emptyStateContainer"]},
|
||||
|
@ -252,7 +252,7 @@
|
|||
"ThreadCard": {"strings": ["threadId", "gotoThread", "container"]},
|
||||
"ThreadSidebar": {"strings": ["channelId", "collectThreadMetadata", "SIDEBAR"]},
|
||||
"TypingUsers": {"class": "typing"},
|
||||
"UnavailableGuildsButton": {"strings": ["className", "default.guildsError"]},
|
||||
"UnavailableGuildsButton": {"strings": ["className", ".default.guildsError"]},
|
||||
"Upload": {"class": "uploadmodal"},
|
||||
"UserHook": {"class": "auditloguserhook"},
|
||||
"UserSettingsAppearance": {"class": "usersettingsappearancepreview"},
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @name DisplayServersAsChannels
|
||||
* @author DevilBro
|
||||
* @authorId 278543574059057154
|
||||
* @version 1.5.2
|
||||
* @version 1.5.3
|
||||
* @description Displays Servers in a similar way as Channels
|
||||
* @invite Jx3TjNS
|
||||
* @donate https://www.paypal.me/MircoWittrien
|
||||
|
@ -17,7 +17,7 @@ module.exports = (_ => {
|
|||
"info": {
|
||||
"name": "DisplayServersAsChannels",
|
||||
"author": "DevilBro",
|
||||
"version": "1.5.2",
|
||||
"version": "1.5.3",
|
||||
"description": "Displays Servers in a similar way as Channels"
|
||||
}
|
||||
};
|
||||
|
@ -85,7 +85,7 @@ module.exports = (_ => {
|
|||
this.patchedModules = {
|
||||
after: {
|
||||
Guilds: "type",
|
||||
DefaultHomeButton: "DefaultHomeButton",
|
||||
HomeButton: "type",
|
||||
DirectMessage: "render",
|
||||
Guild: "default",
|
||||
GuildFolder: "render",
|
||||
|
@ -172,7 +172,7 @@ module.exports = (_ => {
|
|||
}
|
||||
}
|
||||
|
||||
processDefaultHomeButton (e) {
|
||||
processHomeButton (e) {
|
||||
this.removeTooltip(e.returnvalue);
|
||||
this.removeMask(e.returnvalue);
|
||||
this.addElementName(e.returnvalue, BDFDB.LanguageUtils.LanguageStrings.HOME);
|
||||
|
@ -232,9 +232,23 @@ module.exports = (_ => {
|
|||
}
|
||||
|
||||
processCircleIconButton (e) {
|
||||
this.removeTooltip(e.returnvalue);
|
||||
this.removeMask(e.returnvalue);
|
||||
this.addElementName(e.returnvalue, e.instance.props.tooltipText, {
|
||||
const child = BDFDB.ReactUtils.findChild(e.returnvalue, {filter: n => n.props && n.props.id && typeof n.props.children == "function"});
|
||||
if (child) {
|
||||
let renderChildren = child.props.children;
|
||||
child.props.children = BDFDB.TimeUtils.suppress((...args) => {
|
||||
let renderedChildren = renderChildren(...args);
|
||||
renderedChildren = BDFDB.ReactUtils.createElement(BDFDB.ReactUtils.Fragment, {children: renderedChildren});
|
||||
this._processCircleIconButton(e.instance, renderedChildren);
|
||||
return renderedChildren;
|
||||
});
|
||||
}
|
||||
else this._processCircleIconButton(e.instance, e.returnvalue);
|
||||
}
|
||||
|
||||
_processCircleIconButton (instance, returnvalue) {
|
||||
this.removeTooltip(returnvalue);
|
||||
this.removeMask(returnvalue);
|
||||
this.addElementName(returnvalue, instance.props.tooltip, {
|
||||
wrap: true,
|
||||
backgroundColor: "transparent"
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue