diff --git a/src/plugins/imageZoom/index.tsx b/src/plugins/imageZoom/index.tsx index 25a0ab7d4..d7e8d487b 100644 --- a/src/plugins/imageZoom/index.tsx +++ b/src/plugins/imageZoom/index.tsx @@ -21,6 +21,7 @@ import { definePluginSettings } from "@api/Settings"; import { makeRange } from "@components/PluginSettings/components"; import { debounce } from "@shared/debounce"; import { Devs } from "@utils/constants"; +import { Logger } from "@utils/Logger"; import definePlugin, { OptionType } from "@utils/types"; import { Menu, ReactDOM } from "@webpack/common"; import { JSX } from "react"; @@ -237,12 +238,16 @@ export default definePlugin({ }, renderMagnifier(instance) { - if (instance.props.id === ELEMENT_ID) { - if (!this.currentMagnifierElement) { - this.currentMagnifierElement = ; - this.root = ReactDOM.createRoot(this.element!); - this.root.render(this.currentMagnifierElement); + try { + if (instance.props.id === ELEMENT_ID) { + if (!this.currentMagnifierElement) { + this.currentMagnifierElement = ; + this.root = ReactDOM.createRoot(this.element!); + this.root.render(this.currentMagnifierElement); + } } + } catch (error) { + new Logger("ImageZoom").error("Failed to render magnifier:", error); } }, diff --git a/src/plugins/mutualGroupDMs/style.css b/src/plugins/mutualGroupDMs/style.css index 14ea83c9d..3d06568f6 100644 --- a/src/plugins/mutualGroupDMs/style.css +++ b/src/plugins/mutualGroupDMs/style.css @@ -1,4 +1,3 @@ .vc-mutual-gdms-tab-bar { gap: 0; - justify-content: space-between; } diff --git a/src/plugins/serverInfo/GuildInfoModal.tsx b/src/plugins/serverInfo/GuildInfoModal.tsx index c8e658b47..b3bcaf55d 100644 --- a/src/plugins/serverInfo/GuildInfoModal.tsx +++ b/src/plugins/serverInfo/GuildInfoModal.tsx @@ -18,7 +18,7 @@ import { Guild, User } from "discord-types/general"; import { settings } from "."; const IconClasses = findByPropsLazy("icon", "acronym", "childWrapper"); -const FriendRow = findComponentByCodeLazy(".listName,discriminatorClass"); +const FriendRow = findComponentByCodeLazy("discriminatorClass:", ".isMobileOnline", "getAvatarURL"); const cl = classNameFactory("vc-gp-"); diff --git a/src/plugins/serverInfo/styles.css b/src/plugins/serverInfo/styles.css index 8b3d337f3..a77605e91 100644 --- a/src/plugins/serverInfo/styles.css +++ b/src/plugins/serverInfo/styles.css @@ -50,8 +50,6 @@ border-bottom: 2px solid transparent; color: var(--interactive-normal); cursor: pointer; - height: 39px; - margin-right: -10px; line-height: 14px; } diff --git a/src/plugins/showMeYourName/index.tsx b/src/plugins/showMeYourName/index.tsx index da752c459..f167287f0 100644 --- a/src/plugins/showMeYourName/index.tsx +++ b/src/plugins/showMeYourName/index.tsx @@ -54,9 +54,10 @@ export default definePlugin({ authors: [Devs.Rini, Devs.TheKodeToad], patches: [ { - find: '?"@":""', + find: '"BaseUsername"', replacement: { - match: /(?<=onContextMenu:\i,children:)\i\+\i/, + /* TODO: remove \i+\i once change makes it to stable */ + match: /(?<=onContextMenu:\i,children:)(?:\i\+\i|\i)/, replace: "$self.renderUsername(arguments[0])" } }, diff --git a/src/plugins/webContextMenus.web/index.ts b/src/plugins/webContextMenus.web/index.ts index 621ea0288..cf4f1ff80 100644 --- a/src/plugins/webContextMenus.web/index.ts +++ b/src/plugins/webContextMenus.web/index.ts @@ -131,6 +131,13 @@ export default definePlugin({ ] }, + { + find: "Copy image not supported", + replacement: { + match: /(?<=(?:canSaveImage|canCopyImage)\(\i?\)\{.{0,50})!\i\.isPlatformEmbedded/g, + replace: "false" + } + }, // Add back Copy & Save Image { find: 'id:"copy-image"', @@ -141,7 +148,7 @@ export default definePlugin({ replace: "false" }, { - match: /return\s*?\[\i\.\i\.canCopyImage\(\)/, + match: /return\s*?\[.{0,50}?(?=\?.{0,100}?id:"copy-image")/, replace: "return [true" }, { diff --git a/src/webpack/common/react.ts b/src/webpack/common/react.ts index 90f071d2a..f1330bdc1 100644 --- a/src/webpack/common/react.ts +++ b/src/webpack/common/react.ts @@ -27,7 +27,7 @@ export let useRef: typeof React.useRef; export let useReducer: typeof React.useReducer; export let useCallback: typeof React.useCallback; -export const ReactDOM: typeof import("react-dom") & typeof import("react-dom/client") = findByPropsLazy("createPortal", "render"); +export const ReactDOM: typeof import("react-dom") & typeof import("react-dom/client") = findByPropsLazy("createPortal"); waitFor("useState", m => { React = m;