diff --git a/src/plugins/betterRoleContext/index.tsx b/src/plugins/betterRoleContext/index.tsx
index f9c06110..bf4cf0f3 100644
--- a/src/plugins/betterRoleContext/index.tsx
+++ b/src/plugins/betterRoleContext/index.tsx
@@ -8,7 +8,7 @@ import { definePluginSettings } from "@api/Settings";
import { getUserSettingLazy } from "@api/UserSettings";
import { ImageIcon } from "@components/Icons";
import { Devs } from "@utils/constants";
-import { getCurrentGuild, openMediaModal } from "@utils/discord";
+import { getCurrentGuild, openImageModal } from "@utils/discord";
import definePlugin, { OptionType } from "@utils/types";
import { findByPropsLazy } from "@webpack";
import { Clipboard, GuildStore, Menu, PermissionStore } from "@webpack/common";
@@ -99,7 +99,7 @@ export default definePlugin({
id="vc-view-role-icon"
label="View Role Icon"
action={() => {
- openMediaModal(`${location.protocol}//${window.GLOBAL_ENV.CDN_HOST}/role-icons/${role.id}/${role.icon}.${settings.store.roleIconFileFormat}`);
+ openImageModal(`${location.protocol}//${window.GLOBAL_ENV.CDN_HOST}/role-icons/${role.id}/${role.icon}.${settings.store.roleIconFileFormat}`);
}}
icon={ImageIcon}
/>
diff --git a/src/plugins/biggerStreamPreview/index.tsx b/src/plugins/biggerStreamPreview/index.tsx
index de0ca55e..8cca912b 100644
--- a/src/plugins/biggerStreamPreview/index.tsx
+++ b/src/plugins/biggerStreamPreview/index.tsx
@@ -19,7 +19,7 @@
import { NavContextMenuPatchCallback } from "@api/ContextMenu";
import { ScreenshareIcon } from "@components/Icons";
import { Devs } from "@utils/constants";
-import { openMediaModal } from "@utils/discord";
+import { openImageModal } from "@utils/discord";
import definePlugin from "@utils/types";
import { Menu } from "@webpack/common";
import { Channel, User } from "discord-types/general";
@@ -57,7 +57,7 @@ export const handleViewPreview = async ({ guildId, channelId, ownerId }: Applica
const previewUrl = await ApplicationStreamPreviewStore.getPreviewURL(guildId, channelId, ownerId);
if (!previewUrl) return;
- openMediaModal(previewUrl);
+ openImageModal(previewUrl);
};
export const addViewStreamContext: NavContextMenuPatchCallback = (children, { userId }: { userId: string | bigint; }) => {
diff --git a/src/plugins/imageZoom/index.tsx b/src/plugins/imageZoom/index.tsx
index 273d022e..59b2667c 100644
--- a/src/plugins/imageZoom/index.tsx
+++ b/src/plugins/imageZoom/index.tsx
@@ -156,14 +156,14 @@ export default definePlugin({
patches: [
{
- find: ".contain,SCALE_DOWN:",
+ find: "Messages.OPEN_IN_BROWSER",
replacement: {
// there are 2 image thingies. one for carosuel and one for the single image.
// so thats why i added global flag.
// also idk if this patch is good, should it be more specific?
// https://regex101.com/r/xfvNvV/1
- match: /\.slide,\i\),/g,
- replace: `$&id:"${ELEMENT_ID}",`
+ match: /return.{1,200}\.wrapper.{1,200}src:\i,/g,
+ replace: `$&id: '${ELEMENT_ID}',`
}
},
diff --git a/src/plugins/serverInfo/GuildInfoModal.tsx b/src/plugins/serverInfo/GuildInfoModal.tsx
index e2007dfe..fb8df2ce 100644
--- a/src/plugins/serverInfo/GuildInfoModal.tsx
+++ b/src/plugins/serverInfo/GuildInfoModal.tsx
@@ -7,7 +7,7 @@
import "./styles.css";
import { classNameFactory } from "@api/Styles";
-import { openMediaModal, openUserProfile } from "@utils/discord";
+import { openImageModal, openUserProfile } from "@utils/discord";
import { classes } from "@utils/misc";
import { ModalRoot, ModalSize, openModal } from "@utils/modal";
import { useAwaiter } from "@utils/react";
@@ -80,7 +80,7 @@ function GuildInfoModal({ guild }: GuildProps) {
className={cl("banner")}
src={bannerUrl}
alt=""
- onClick={() => openMediaModal(bannerUrl)}
+ onClick={() => openImageModal(bannerUrl)}
/>
)}
@@ -89,7 +89,7 @@ function GuildInfoModal({ guild }: GuildProps) {
? openMediaModal(iconUrl)}
+ onClick={() => openImageModal(iconUrl)}
/>
: