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) 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 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; + } }); 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)" } }, {