Update classes
This commit is contained in:
parent
1c4fb0b5ea
commit
ac79bbb99b
|
@ -336,7 +336,7 @@ export class ReactAutoPatcher {
|
||||||
}
|
}
|
||||||
|
|
||||||
static async patchChannelMember() {
|
static async patchChannelMember() {
|
||||||
this.ChannelMember = await ReactComponents.getComponent('ChannelMember', { selector: '.member-2FrNV0' });
|
this.ChannelMember = await ReactComponents.getComponent('ChannelMember', { selector: '.member-3W1lQa' });
|
||||||
this.unpatchChannelMemberRender = MonkeyPatch('BD:ReactComponents', this.ChannelMember.component.prototype).after('render', (component, args, retVal) => {
|
this.unpatchChannelMemberRender = MonkeyPatch('BD:ReactComponents', this.ChannelMember.component.prototype).after('render', (component, args, retVal) => {
|
||||||
if (!retVal.props || !retVal.props.children) return;
|
if (!retVal.props || !retVal.props.children) return;
|
||||||
const user = Helpers.findProp(component, 'user');
|
const user = Helpers.findProp(component, 'user');
|
||||||
|
@ -392,7 +392,7 @@ export class ReactAutoPatcher {
|
||||||
}
|
}
|
||||||
|
|
||||||
static async patchUserProfileModal() {
|
static async patchUserProfileModal() {
|
||||||
this.UserProfileModal = await ReactComponents.getComponent('UserProfileModal', { selector: '.root-2sNHUF' }, Filters.byPrototypeFields(['renderHeader', 'renderBadges']));
|
this.UserProfileModal = await ReactComponents.getComponent('UserProfileModal', { selector: '.root-SR8cQa' }, Filters.byPrototypeFields(['renderHeader', 'renderBadges']));
|
||||||
this.unpatchUserProfileModal = MonkeyPatch('BD:ReactComponents', this.UserProfileModal.component.prototype).after('render', (component, args, retVal) => {
|
this.unpatchUserProfileModal = MonkeyPatch('BD:ReactComponents', this.UserProfileModal.component.prototype).after('render', (component, args, retVal) => {
|
||||||
const { user } = component.props;
|
const { user } = component.props;
|
||||||
if (!user) return;
|
if (!user) return;
|
||||||
|
@ -401,13 +401,13 @@ export class ReactAutoPatcher {
|
||||||
if (user.id === DiscordApi.currentUser.id) retVal.props.className += ' bd-isCurrentUser';
|
if (user.id === DiscordApi.currentUser.id) retVal.props.className += ' bd-isCurrentUser';
|
||||||
});
|
});
|
||||||
|
|
||||||
for (const e of document.querySelectorAll('.root-2sNHUF')) {
|
for (const e of document.querySelectorAll('.root-SR8cQa')) {
|
||||||
Reflection(e).forceUpdate();
|
Reflection(e).forceUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static async patchUserPopout() {
|
static async patchUserPopout() {
|
||||||
this.UserProfileModal = await ReactComponents.getComponent('UserPopout', { selector: '.userPopout-11hFKo' });
|
this.UserProfileModal = await ReactComponents.getComponent('UserPopout', { selector: '.userPopout-3XzG_A' });
|
||||||
this.unpatchUserProfileModal = MonkeyPatch('BD:ReactComponents', this.UserProfileModal.component.prototype).after('render', (component, args, retVal) => {
|
this.unpatchUserProfileModal = MonkeyPatch('BD:ReactComponents', this.UserProfileModal.component.prototype).after('render', (component, args, retVal) => {
|
||||||
const { user, guild, guildMember } = component.props;
|
const { user, guild, guildMember } = component.props;
|
||||||
if (!user) return;
|
if (!user) return;
|
||||||
|
@ -420,7 +420,7 @@ export class ReactAutoPatcher {
|
||||||
if (guildMember && guildMember.roles.length) retVal.props.className += ' bd-hasRoles';
|
if (guildMember && guildMember.roles.length) retVal.props.className += ' bd-hasRoles';
|
||||||
});
|
});
|
||||||
|
|
||||||
for (const e of document.querySelectorAll('.userPopout-11hFKo')) {
|
for (const e of document.querySelectorAll('.userPopout-3XzG_A')) {
|
||||||
Reflection(e).forceUpdate();
|
Reflection(e).forceUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,7 +105,7 @@ export default class extends Module {
|
||||||
if (this.PatchedNameTag) return this.PatchedNameTag;
|
if (this.PatchedNameTag) return this.PatchedNameTag;
|
||||||
|
|
||||||
const ProfileBadges = this;
|
const ProfileBadges = this;
|
||||||
const NameTag = await ReactComponents.getComponent('NameTag', {selector: '.nameTag-26T3kW'});
|
const NameTag = await ReactComponents.getComponent('NameTag', {selector: '.nameTag-m8r81H'});
|
||||||
|
|
||||||
this.PatchedNameTag = class extends NameTag.component {
|
this.PatchedNameTag = class extends NameTag.component {
|
||||||
render() {
|
render() {
|
||||||
|
@ -143,7 +143,7 @@ export default class extends Module {
|
||||||
|
|
||||||
// Rerender all channel members
|
// Rerender all channel members
|
||||||
if (this.unpatchChannelMemberRender) {
|
if (this.unpatchChannelMemberRender) {
|
||||||
for (const channelMember of document.querySelectorAll('.member-2FrNV0')) {
|
for (const channelMember of document.querySelectorAll('.member-3W1lQa')) {
|
||||||
Reflection(channelMember).forceUpdate();
|
Reflection(channelMember).forceUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue