stuff
This commit is contained in:
parent
e55a8defcd
commit
d5f959e3b4
|
@ -2,7 +2,7 @@
|
||||||
* @name EditChannels
|
* @name EditChannels
|
||||||
* @author DevilBro
|
* @author DevilBro
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @version 4.3.7
|
* @version 4.3.8
|
||||||
* @description Allows you to locally edit Channels
|
* @description Allows you to locally edit Channels
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https://www.paypal.me/MircoWittrien
|
||||||
|
@ -17,13 +17,8 @@ module.exports = (_ => {
|
||||||
"info": {
|
"info": {
|
||||||
"name": "EditChannels",
|
"name": "EditChannels",
|
||||||
"author": "DevilBro",
|
"author": "DevilBro",
|
||||||
"version": "4.3.7",
|
"version": "4.3.8",
|
||||||
"description": "Allows you to locally edit Channels"
|
"description": "Allows you to locally edit Channels"
|
||||||
},
|
|
||||||
"changeLog": {
|
|
||||||
"fixed": {
|
|
||||||
"App Title": "Fixed an Issue where a changed App Title for a changed Channel would persist to the Friends Page"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -101,7 +96,7 @@ module.exports = (_ => {
|
||||||
AutocompleteChannelResult: "render",
|
AutocompleteChannelResult: "render",
|
||||||
GuildSettingsAuditLogEntry: "render",
|
GuildSettingsAuditLogEntry: "render",
|
||||||
SettingsInvites: "render",
|
SettingsInvites: "render",
|
||||||
HeaderBarContainer: "render",
|
HeaderBarContainer: "default",
|
||||||
ChannelCategoryItem: "type",
|
ChannelCategoryItem: "type",
|
||||||
ChannelItem: "default",
|
ChannelItem: "default",
|
||||||
GuildSidebarThreadListEntry: "type",
|
GuildSidebarThreadListEntry: "type",
|
||||||
|
@ -114,7 +109,7 @@ module.exports = (_ => {
|
||||||
ThreadCreated: "default",
|
ThreadCreated: "default",
|
||||||
AutocompleteChannelResult: "render",
|
AutocompleteChannelResult: "render",
|
||||||
GuildSettingsAuditLogEntry: "render",
|
GuildSettingsAuditLogEntry: "render",
|
||||||
HeaderBarContainer: "render",
|
HeaderBarContainer: "default",
|
||||||
ThreadSidebar: "default",
|
ThreadSidebar: "default",
|
||||||
ThreadCard: "type",
|
ThreadCard: "type",
|
||||||
FocusRing: "default",
|
FocusRing: "default",
|
||||||
|
@ -223,8 +218,7 @@ module.exports = (_ => {
|
||||||
|
|
||||||
this.changeAppTitle();
|
this.changeAppTitle();
|
||||||
BDFDB.PatchUtils.forceAllUpdates(this);
|
BDFDB.PatchUtils.forceAllUpdates(this);
|
||||||
BDFDB.ChannelUtils.rerenderAll(instant);
|
BDFDB.DiscordUtils.rerenderAll(instant);
|
||||||
BDFDB.ReactUtils.forceUpdate(BDFDB.ReactUtils.findOwner(document.querySelector(BDFDB.dotCN.app), {name: "Channel", unlimited: true}));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onChannelContextMenu (e) {
|
onChannelContextMenu (e) {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* @name EditUsers
|
* @name EditUsers
|
||||||
* @author DevilBro
|
* @author DevilBro
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @version 4.5.4
|
* @version 4.5.6
|
||||||
* @description Allows you to locally edit Users
|
* @description Allows you to locally edit Users
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https://www.paypal.me/MircoWittrien
|
||||||
|
@ -17,13 +17,8 @@ module.exports = (_ => {
|
||||||
"info": {
|
"info": {
|
||||||
"name": "EditUsers",
|
"name": "EditUsers",
|
||||||
"author": "DevilBro",
|
"author": "DevilBro",
|
||||||
"version": "4.5.5",
|
"version": "4.5.6",
|
||||||
"description": "Allows you to locally edit Users"
|
"description": "Allows you to locally edit Users"
|
||||||
},
|
|
||||||
"changeLog": {
|
|
||||||
"fixed": {
|
|
||||||
"App Title": "Fixed an Issue where a changed App Title for a changed User DM would persist to the Friends Page"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -104,7 +99,7 @@ module.exports = (_ => {
|
||||||
|
|
||||||
this.patchedModules = {
|
this.patchedModules = {
|
||||||
before: {
|
before: {
|
||||||
HeaderBarContainer: "render",
|
HeaderBarContainer: "default",
|
||||||
ChannelEditorContainer: "render",
|
ChannelEditorContainer: "render",
|
||||||
AutocompleteUserResult: "render",
|
AutocompleteUserResult: "render",
|
||||||
UserBanner: "default",
|
UserBanner: "default",
|
||||||
|
@ -206,6 +201,12 @@ module.exports = (_ => {
|
||||||
onStart () {
|
onStart () {
|
||||||
let observer = new MutationObserver(_ => {this.changeAppTitle();});
|
let observer = new MutationObserver(_ => {this.changeAppTitle();});
|
||||||
BDFDB.ObserverUtils.connect(this, document.head.querySelector("title"), {name: "appTitleObserver", instance: observer}, {childList: true});
|
BDFDB.ObserverUtils.connect(this, document.head.querySelector("title"), {name: "appTitleObserver", instance: observer}, {childList: true});
|
||||||
|
|
||||||
|
BDFDB.PatchUtils.patch(this, BDFDB.LibraryModules.StageChannelUtils, "getMutableParticipants", {after: e => {
|
||||||
|
if (BDFDB.ArrayUtils.is(e.returnValue)) for (let i in e.returnValue) {
|
||||||
|
if (e.returnValue[i] && e.returnValue[i].user && changedUsers[e.returnValue[i].user.id]) e.returnValue[i] = Object.assign({}, e.returnValue[i], {user: this.getUserData(e.returnValue[i].user.id)});
|
||||||
|
}
|
||||||
|
}});
|
||||||
|
|
||||||
BDFDB.PatchUtils.patch(this, BDFDB.LibraryModules.MessageAuthorUtils, ["default", "getMessageAuthor"], {after: e => {
|
BDFDB.PatchUtils.patch(this, BDFDB.LibraryModules.MessageAuthorUtils, ["default", "getMessageAuthor"], {after: e => {
|
||||||
if (this.settings.places.chatWindow && e.methodArguments[0] && e.methodArguments[0].author && changedUsers[e.methodArguments[0].author.id] && this.shouldChangeInChat(e.methodArguments[0].channel_id)) {
|
if (this.settings.places.chatWindow && e.methodArguments[0] && e.methodArguments[0].author && changedUsers[e.methodArguments[0].author.id] && this.shouldChangeInChat(e.methodArguments[0].channel_id)) {
|
||||||
|
@ -363,15 +364,10 @@ module.exports = (_ => {
|
||||||
|
|
||||||
forceUpdateAll () {
|
forceUpdateAll () {
|
||||||
changedUsers = BDFDB.DataUtils.load(this, "users");
|
changedUsers = BDFDB.DataUtils.load(this, "users");
|
||||||
// REMOVE 21.04.2022
|
|
||||||
for (let id in changedUsers) if (changedUsers[id].color5) {
|
|
||||||
changedUsers[id].color2 = changedUsers[id].color5;
|
|
||||||
delete changedUsers[id].color5;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.changeAppTitle();
|
this.changeAppTitle();
|
||||||
BDFDB.PatchUtils.forceAllUpdates(this);
|
BDFDB.PatchUtils.forceAllUpdates(this);
|
||||||
BDFDB.MessageUtils.rerenderAll();
|
BDFDB.DiscordUtils.rerenderAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
onDMContextMenu (e) {
|
onDMContextMenu (e) {
|
||||||
|
@ -685,8 +681,6 @@ module.exports = (_ => {
|
||||||
e.instance.props.currentUser = this.getUserData(e.instance.props.currentUser.id);
|
e.instance.props.currentUser = this.getUserData(e.instance.props.currentUser.id);
|
||||||
if (data && (data.removeStatus || data.status || data.statusEmoji)) e.instance.props.customStatusActivity = this.createCustomStatus(data);
|
if (data && (data.removeStatus || data.status || data.statusEmoji)) e.instance.props.customStatusActivity = this.createCustomStatus(data);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -793,7 +787,8 @@ module.exports = (_ => {
|
||||||
else this.changeUserColor(messageUsername, author.id, {guildId: (BDFDB.LibraryModules.ChannelStore.getChannel(e.instance.props.message.channel_id) || {}).guild_id});
|
else this.changeUserColor(messageUsername, author.id, {guildId: (BDFDB.LibraryModules.ChannelStore.getChannel(e.instance.props.message.channel_id) || {}).guild_id});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.injectBadge(e.returnvalue.props.children, author.id, (BDFDB.LibraryModules.ChannelStore.getChannel(e.instance.props.message.channel_id) || {}).guild_id, e.instance.props.compact ? 0 : 2, {
|
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name: "Popout"});
|
||||||
|
if (index > -1) this.injectBadge(children, author.id, (BDFDB.LibraryModules.ChannelStore.getChannel(e.instance.props.message.channel_id) || {}).guild_id, e.instance.props.compact ? index : (index + 1), {
|
||||||
tagClass: e.instance.props.compact ? BDFDB.disCN.messagebottagcompact : BDFDB.disCN.messagebottagcozy,
|
tagClass: e.instance.props.compact ? BDFDB.disCN.messagebottagcompact : BDFDB.disCN.messagebottagcozy,
|
||||||
useRem: true
|
useRem: true
|
||||||
});
|
});
|
||||||
|
@ -944,7 +939,10 @@ module.exports = (_ => {
|
||||||
};
|
};
|
||||||
changeMentionName(mention);
|
changeMentionName(mention);
|
||||||
}
|
}
|
||||||
if (data.color1) mention.props.color = BDFDB.ColorUtils.convert(BDFDB.ObjectUtils.is(data.color1) ? data.color1[0] : data.color1, "INT");
|
if (data.color1) {
|
||||||
|
mention.props.color = BDFDB.ColorUtils.convert(BDFDB.ObjectUtils.is(data.color1) ? data.color1[0] : data.color1, "INT");
|
||||||
|
if (mention.props.children && mention.props.children.props) mention.props.children.props.color = mention.props.color;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
processChannelReply (e) {
|
processChannelReply (e) {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* @name StaffTag
|
* @name StaffTag
|
||||||
* @author DevilBro
|
* @author DevilBro
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @version 1.5.0
|
* @version 1.5.1
|
||||||
* @description Adds a Crown/Tag to Server Owners (or Admins/Management)
|
* @description Adds a Crown/Tag to Server Owners (or Admins/Management)
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https://www.paypal.me/MircoWittrien
|
||||||
|
@ -17,13 +17,8 @@ module.exports = (_ => {
|
||||||
"info": {
|
"info": {
|
||||||
"name": "StaffTag",
|
"name": "StaffTag",
|
||||||
"author": "DevilBro",
|
"author": "DevilBro",
|
||||||
"version": "1.5.0",
|
"version": "1.5.1",
|
||||||
"description": "Adds a Crown/Tag to Server Owners (or Admins/Management)"
|
"description": "Adds a Crown/Tag to Server Owners (or Admins/Management)"
|
||||||
},
|
|
||||||
"changeLog": {
|
|
||||||
"added": {
|
|
||||||
"More Management Permission Sub Types": "Added new Sub Types (Threads, Event, Voice Channels [kick, mute, move])"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -250,9 +245,11 @@ module.exports = (_ => {
|
||||||
|
|
||||||
processMessageUsername (e) {
|
processMessageUsername (e) {
|
||||||
if (!e.instance.props.message || !this.settings.tagPlaces.chat) return;
|
if (!e.instance.props.message || !this.settings.tagPlaces.chat) return;
|
||||||
|
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name: "Popout"});
|
||||||
|
if (index == -1) return;
|
||||||
const author = e.instance.props.userOverride || e.instance.props.message.author;
|
const author = e.instance.props.userOverride || e.instance.props.message.author;
|
||||||
let userType = this.getUserType(author, e.instance.props.message.channel_id);
|
let userType = this.getUserType(author, e.instance.props.message.channel_id);
|
||||||
if (userType) this.injectStaffTag(e.returnvalue.props.children, author, userType, e.instance.props.compact ? 0 : 2, {
|
if (userType) this.injectStaffTag(children, author, userType, e.instance.props.compact ? index : (index + 1), {
|
||||||
channelId: e.instance.props.message.channel_id,
|
channelId: e.instance.props.message.channel_id,
|
||||||
tagClass: e.instance.props.compact ? BDFDB.disCN.messagebottagcompact : BDFDB.disCN.messagebottagcozy,
|
tagClass: e.instance.props.compact ? BDFDB.disCN.messagebottagcompact : BDFDB.disCN.messagebottagcozy,
|
||||||
useRem: true
|
useRem: true
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* @name TopRoleEverywhere
|
* @name TopRoleEverywhere
|
||||||
* @author DevilBro
|
* @author DevilBro
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @version 3.0.7
|
* @version 3.0.8
|
||||||
* @description Adds the highest Role of a User as a Tag
|
* @description Adds the highest Role of a User as a Tag
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https://www.paypal.me/MircoWittrien
|
||||||
|
@ -17,13 +17,8 @@ module.exports = (_ => {
|
||||||
"info": {
|
"info": {
|
||||||
"name": "TopRoleEverywhere",
|
"name": "TopRoleEverywhere",
|
||||||
"author": "DevilBro",
|
"author": "DevilBro",
|
||||||
"version": "3.0.7",
|
"version": "3.0.8",
|
||||||
"description": "Adds the highest Role of a User as a Tag"
|
"description": "Adds the highest Role of a User as a Tag"
|
||||||
},
|
|
||||||
"changeLog": {
|
|
||||||
"fixed": {
|
|
||||||
"Role/ID Swap": "Added Option to swap userId/role"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -184,12 +179,14 @@ module.exports = (_ => {
|
||||||
|
|
||||||
processMessageUsername (e) {
|
processMessageUsername (e) {
|
||||||
if (!e.instance.props.message) return;
|
if (!e.instance.props.message) return;
|
||||||
|
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name: "Popout"});
|
||||||
|
if (index == -1) return;
|
||||||
const author = e.instance.props.userOverride || e.instance.props.message.author;
|
const author = e.instance.props.userOverride || e.instance.props.message.author;
|
||||||
if (this.settings.places.chat) this.injectRoleTag(e.returnvalue.props.children, author, "chat", e.instance.props.compact ? 0 : 2, {
|
if (this.settings.places.chat) this.injectRoleTag(children, author, "chat", e.instance.props.compact ? index : (index + 1), {
|
||||||
tagClass: e.instance.props.compact ? BDFDB.disCN.messagebottagcompact : BDFDB.disCN.messagebottagcozy,
|
tagClass: e.instance.props.compact ? BDFDB.disCN.messagebottagcompact : BDFDB.disCN.messagebottagcozy,
|
||||||
useRem: true
|
useRem: true
|
||||||
});
|
});
|
||||||
if (this.settings.general.addUserId) this.injectIdTag(e.returnvalue.props.children, author, "chat", (e.instance.props.compact ? 0 : 2) + (this.settings.general.userIdFirst ? 0 : 1), {
|
if (this.settings.general.addUserId) this.injectIdTag(e.returnvalue.props.children, author, "chat", (e.instance.props.compact ? index : (index + 1)) + (this.settings.general.userIdFirst ? 0 : 1), {
|
||||||
tagClass: e.instance.props.compact ? BDFDB.disCN.messagebottagcompact : BDFDB.disCN.messagebottagcozy,
|
tagClass: e.instance.props.compact ? BDFDB.disCN.messagebottagcompact : BDFDB.disCN.messagebottagcozy,
|
||||||
useRem: true
|
useRem: true
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue