From 8d65bcf74319004b8dbafb2599a109879ace1b52 Mon Sep 17 00:00:00 2001
From: Nuckyz <61953774+Nuckyz@users.noreply.github.com>
Date: Tue, 10 Dec 2024 18:09:54 -0300
Subject: [PATCH 1/4] BetterFolders: Fix folder icon setting
---
src/plugins/betterFolders/index.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/plugins/betterFolders/index.tsx b/src/plugins/betterFolders/index.tsx
index 6f9b796e8..c43e17110 100644
--- a/src/plugins/betterFolders/index.tsx
+++ b/src/plugins/betterFolders/index.tsx
@@ -185,7 +185,7 @@ export default definePlugin({
{
// Decide if we should render the expanded folder background if we are rendering the Better Folders sidebar
predicate: () => settings.store.showFolderIcon !== FolderIconDisplay.Always,
- match: /(?<=\.wrapper,children:\[)/,
+ match: /(?<=\.isExpanded\),children:\[)/,
replace: "$self.shouldShowFolderIconAndBackground(!!arguments[0]?.isBetterFolders,arguments[0]?.betterFoldersExpandedIds)&&"
},
{
From 9d3c91e9df7f5168da2ce8b6d1f60e0fd792f935 Mon Sep 17 00:00:00 2001
From: Nuckyz <61953774+Nuckyz@users.noreply.github.com>
Date: Tue, 10 Dec 2024 18:29:15 -0300
Subject: [PATCH 2/4] TypingTweaks: Fix plugin
---
src/plugins/typingTweaks/index.tsx | 45 ++++++++++++++----------------
1 file changed, 21 insertions(+), 24 deletions(-)
diff --git a/src/plugins/typingTweaks/index.tsx b/src/plugins/typingTweaks/index.tsx
index e2bbb4bc9..026cd527b 100644
--- a/src/plugins/typingTweaks/index.tsx
+++ b/src/plugins/typingTweaks/index.tsx
@@ -91,34 +91,31 @@ export default definePlugin({
name: "TypingTweaks",
description: "Show avatars and role colours in the typing indicator",
authors: [Devs.zt],
+ settings,
+
patches: [
- // Style the indicator and add function call to modify the children before rendering
{
- find: "getCooldownTextStyle",
- replacement: {
- match: /(?<=children:\[(\i)\.length>0.{0,200}?"aria-atomic":!0,children:)\i/,
- replace: "$self.mutateChildren(this.props, $1, $&), style: $self.TYPING_TEXT_STYLE"
- }
- },
- // Changes the indicator to keep the user object when creating the list of typing users
- {
- find: "getCooldownTextStyle",
- replacement: {
- match: /(?<=map\(\i=>)\i\.\i\.getName\(\i,this\.props\.channel\.id,(\i)\)/,
- replace: "$1"
- }
- },
- // Adds the alternative formatting for several users typing
- {
- find: "getCooldownTextStyle",
- replacement: {
- match: /(,{a:(\i),b:(\i),c:\i}\):)\i\.\i\.string\(\i\.\i#{intl::SEVERAL_USERS_TYPING}\)(?<=(\i)\.length.+?)/,
- replace: (_, rest, a, b, users) => `${rest}$self.buildSeveralUsers({ a: ${a}, b: ${b}, count: ${users}.length - 2 })`
- },
- predicate: () => settings.store.alternativeFormatting
+ find: "#{intl::THREE_USERS_TYPING}",
+ replacement: [
+ {
+ // Style the indicator and add function call to modify the children before rendering
+ match: /(?<=children:\[(\i)\.length>0.{0,200}?"aria-atomic":!0,children:)\i(?<=guildId:(\i).+?)/,
+ replace: "$self.mutateChildren($2,$1,$&),style:$self.TYPING_TEXT_STYLE"
+ },
+ {
+ // Changes the indicator to keep the user object when creating the list of typing users
+ match: /\.map\((\i)=>\i\.\i\.getName\(\i,\i\.id,\1\)\)/,
+ replace: ""
+ },
+ {
+ // Adds the alternative formatting for several users typing
+ match: /(,{a:(\i),b:(\i),c:\i}\):\i\.length>3&&\(\i=)\i\.\i\.string\(\i\.\i#{intl::SEVERAL_USERS_TYPING}\)(?<=(\i)\.length.+?)/,
+ replace: (_, rest, a, b, users) => `${rest}$self.buildSeveralUsers({ a: ${a}, b: ${b}, count: ${users}.length - 2 })`,
+ predicate: () => settings.store.alternativeFormatting
+ }
+ ]
}
],
- settings,
TYPING_TEXT_STYLE: {
display: "grid",
From dcfddcbc2150c07f2dab5b6c43d9919eec005352 Mon Sep 17 00:00:00 2001
From: sadan4 <117494111+sadan4@users.noreply.github.com>
Date: Tue, 10 Dec 2024 16:37:21 -0500
Subject: [PATCH 3/4] ConsoleJanitor: Add HLJS deprecations (#3062)
---
src/plugins/consoleJanitor/index.ts | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/plugins/consoleJanitor/index.ts b/src/plugins/consoleJanitor/index.ts
index 2c29bf670..03c30ede4 100644
--- a/src/plugins/consoleJanitor/index.ts
+++ b/src/plugins/consoleJanitor/index.ts
@@ -66,6 +66,13 @@ export default definePlugin({
},
patches: [
+ {
+ find: "https://github.com/highlightjs/highlight.js/issues/2277",
+ replacement: {
+ match: /(?<=&&\()console.log\(`Deprecated.+?`\),/,
+ replace: ""
+ }
+ },
{
find: 'react-spring: The "interpolate" function',
replacement: {
From 464c4a9b614a93443575acfd160388d3eb09cb2f Mon Sep 17 00:00:00 2001
From: sadan4 <117494111+sadan4@users.noreply.github.com>
Date: Tue, 10 Dec 2024 23:06:34 -0500
Subject: [PATCH 4/4] TypingTweaks: Fix usernames not being colored (#3070)
---
src/plugins/typingTweaks/index.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/plugins/typingTweaks/index.tsx b/src/plugins/typingTweaks/index.tsx
index 026cd527b..9e6459aba 100644
--- a/src/plugins/typingTweaks/index.tsx
+++ b/src/plugins/typingTweaks/index.tsx
@@ -125,7 +125,7 @@ export default definePlugin({
buildSeveralUsers,
- mutateChildren(props: any, users: User[], children: any) {
+ mutateChildren(guildId: any, users: User[], children: any) {
try {
if (!Array.isArray(children)) {
return children;
@@ -135,7 +135,7 @@ export default definePlugin({
return children.map(c =>
c.type === "strong" || (typeof c !== "string" && !React.isValidElement(c))
- ?
+ ?
: c
);
} catch (e) {