From 8711dd9a4b26077faf17cccd14564ebc04132cd4 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Tue, 3 Dec 2024 21:51:41 -0300 Subject: [PATCH 1/4] WebContextMenus: Fix input bar menu --- src/plugins/webContextMenus.web/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/webContextMenus.web/index.ts b/src/plugins/webContextMenus.web/index.ts index a11ef2431..661238052 100644 --- a/src/plugins/webContextMenus.web/index.ts +++ b/src/plugins/webContextMenus.web/index.ts @@ -164,8 +164,8 @@ export default definePlugin({ find: 'getElementById("slate-toolbar"', predicate: () => settings.store.addBack, replacement: { - match: /(?<=handleContextMenu\(\i\)\{.{0,200}isPlatformEmbedded)\?/, - replace: "||true?" + match: /(?<=handleContextMenu\(\i\)\{.{0,200}isPlatformEmbedded)\)/, + replace: "||true)" } }, { From cdfc89b8192144bc7b58225655c1d52562a84e28 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Tue, 3 Dec 2024 22:39:36 -0300 Subject: [PATCH 2/4] NoScreensharePreview: Migrate to stock Discord feature --- src/plugins/noScreensharePreview/index.ts | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/plugins/noScreensharePreview/index.ts b/src/plugins/noScreensharePreview/index.ts index ca50ad284..6ad39a90f 100644 --- a/src/plugins/noScreensharePreview/index.ts +++ b/src/plugins/noScreensharePreview/index.ts @@ -16,20 +16,23 @@ * along with this program. If not, see . */ +import { Settings } from "@api/Settings"; +import { getUserSettingLazy } from "@api/UserSettings"; import { Devs } from "@utils/constants"; import definePlugin from "@utils/types"; +const DisableStreamPreviews = getUserSettingLazy("voiceAndVideo", "disableStreamPreviews")!; + +// @TODO: Delete this plugin in the future export default definePlugin({ name: "NoScreensharePreview", description: "Disables screenshare previews from being sent.", authors: [Devs.Nuckyz], - patches: [ - { - find: '"ApplicationStreamPreviewUploadManager"', - replacement: { - match: /await \i\.\i\.(makeChunkedRequest\(|post\(\{url:)\i\.\i\.STREAM_PREVIEW.+?\}\)/g, - replace: "0" - } + start() { + if (!DisableStreamPreviews.getSetting()) { + DisableStreamPreviews.updateSetting(true); } - ] + + Settings.plugins.NoScreensharePreview.enabled = false; + } }); From df44edd41ba185ab2afb437cda16c4bafd87ac7e Mon Sep 17 00:00:00 2001 From: sadan4 <117494111+sadan4@users.noreply.github.com> Date: Thu, 5 Dec 2024 19:07:30 -0500 Subject: [PATCH 3/4] BetterFolders: Fix including open folders in main sidebar (#3064) --- 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 68746d361..6f9b796e8 100644 --- a/src/plugins/betterFolders/index.tsx +++ b/src/plugins/betterFolders/index.tsx @@ -159,7 +159,7 @@ export default definePlugin({ ] }, { - find: ".FOLDER_ITEM_GUILD_ICON_MARGIN);", + find: ".expandedFolderBackground,", predicate: () => settings.store.sidebar, replacement: [ // We use arguments[0] to access the isBetterFolders variable in this nested folder component (the parent exports all the props so we don't have to patch it) From a3f5dc39a09506ecbeaa3c496ba9a1a95189a2cc Mon Sep 17 00:00:00 2001 From: Vendicated Date: Sat, 7 Dec 2024 00:13:59 +0100 Subject: [PATCH 4/4] CallTimer: fix crashing on canary --- src/plugins/callTimer/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/callTimer/index.tsx b/src/plugins/callTimer/index.tsx index c018cc715..01b1cb987 100644 --- a/src/plugins/callTimer/index.tsx +++ b/src/plugins/callTimer/index.tsx @@ -75,10 +75,11 @@ export default definePlugin({ patches: [{ find: "renderConnectionStatus(){", replacement: { - match: /(?<=renderConnectionStatus\(\)\{.+\.channel,children:)\i/, + match: /(?<=renderConnectionStatus\(\)\{.+\.channel,children:)\i(?=\})/, replace: "[$&, $self.renderTimer(this.props.channel.id)]" } }], + renderTimer(channelId: string) { return