diff --git a/src/plugins/fixCodeblockGap/README.md b/src/plugins/fixCodeblockGap/README.md new file mode 100644 index 000000000..c60545125 --- /dev/null +++ b/src/plugins/fixCodeblockGap/README.md @@ -0,0 +1,9 @@ +# FixCodeblockGap + +Removes the gap between codeblocks and text below it + +![Message with a codeblock on vanilla Discord]() +![Message with a codeblock with FixCodeblockGap]() + +Fixes an annoying Discord bug causing codeblocks to always have a gap between +them and the following text. diff --git a/src/plugins/ircColors/index.ts b/src/plugins/ircColors/index.ts index f900897e3..23a6902ec 100644 --- a/src/plugins/ircColors/index.ts +++ b/src/plugins/ircColors/index.ts @@ -53,6 +53,12 @@ const settings = definePluginSettings({ type: OptionType.NUMBER, default: 70, }, + memberListColors: { + description: "Replace role colors in the member list", + restartNeeded: true, + type: OptionType.BOOLEAN, + default: false, + }, }); export default definePlugin({ @@ -64,12 +70,23 @@ export default definePlugin({ find: "=\"SYSTEM_TAG\"", replacement: { match: /(?<=className:\i\.username,style:.{0,50}:void 0,)/, - replace: "style:{color:$self.calculateNameColorForContext(arguments[0])}," + replace: "style:{color:$self.calculateNameColorForMessageContext(arguments[0])},", }, }, + { + find: ".NameWithRole,{roleName:", + replacement: { + match: /(?<=color:)null!=.{0,50}?(?=,)/, + replace: "$self.calculateNameColorForListContext(arguments[0])", + }, + predicate: () => settings.store.memberListColors, + }, ], settings, - calculateNameColorForContext(context: any) { + calculateNameColorForMessageContext(context: any) { return calculateNameColorForUser(BigInt(context.message.author.id)); }, + calculateNameColorForListContext(context: any) { + return calculateNameColorForUser(BigInt(context.user.id)); + }, });