+
{!!getCurrentChannel()?.guild_id && (
)}
-
+
{getCreatedAtDate(friendsSince, locale.getLocale())}
@@ -70,4 +94,3 @@ export default definePlugin({
);
}, { noop: true })
});
-
diff --git a/src/plugins/ignoreActivities/index.tsx b/src/plugins/ignoreActivities/index.tsx
index e2262129d..f687a0caf 100644
--- a/src/plugins/ignoreActivities/index.tsx
+++ b/src/plugins/ignoreActivities/index.tsx
@@ -228,15 +228,15 @@ export default definePlugin({
{
find: ".activityTitleText,variant",
replacement: {
- match: /(?<=\i\.activityTitleText.+?children:(\i)\.name.*?}\),)/,
- replace: (_, props) => `$self.renderToggleActivityButton(${props}),`
+ match: /\.activityTitleText.+?children:(\i)\.name.*?}\),/,
+ replace: (m, props) => `${m}$self.renderToggleActivityButton(${props}),`
},
},
{
find: ".activityCardDetails,children",
replacement: {
- match: /(?<=\i\.activityCardDetails.+?children:(\i\.application)\.name.*?}\),)/,
- replace: (_, props) => `$self.renderToggleActivityButton(${props}),`
+ match: /\.activityCardDetails.+?children:(\i\.application)\.name.*?}\),/,
+ replace: (m, props) => `${m}$self.renderToggleActivityButton(${props}),`
}
}
],
diff --git a/src/plugins/imageLink/README.md b/src/plugins/imageLink/README.md
new file mode 100644
index 000000000..add657948
--- /dev/null
+++ b/src/plugins/imageLink/README.md
@@ -0,0 +1,3 @@
+# ImageLink
+
+If a message consists of only a link to an image, Discord hides the link and shows only the image embed. This plugin makes the link show regardless.
diff --git a/src/plugins/imageLink/index.ts b/src/plugins/imageLink/index.ts
new file mode 100644
index 000000000..5e8dd23e9
--- /dev/null
+++ b/src/plugins/imageLink/index.ts
@@ -0,0 +1,24 @@
+/*
+ * Vencord, a Discord client mod
+ * Copyright (c) 2024 Vendicated and contributors
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+import { Devs } from "@utils/constants";
+import definePlugin from "@utils/types";
+
+export default definePlugin({
+ name: "ImageLink",
+ description: "Never hide image links in messages, even if it's the only content",
+ authors: [Devs.Kyuuhachi, Devs.Sqaaakoi],
+
+ patches: [
+ {
+ find: "unknownUserMentionPlaceholder:",
+ replacement: {
+ match: /\(0,\i\.isEmbedInline\)\(\i\)/,
+ replace: "false",
+ }
+ }
+ ]
+});
diff --git a/src/plugins/imageZoom/components/Magnifier.tsx b/src/plugins/imageZoom/components/Magnifier.tsx
index 816717350..585026d60 100644
--- a/src/plugins/imageZoom/components/Magnifier.tsx
+++ b/src/plugins/imageZoom/components/Magnifier.tsx
@@ -17,6 +17,7 @@
*/
import { classNameFactory } from "@api/Styles";
+import ErrorBoundary from "@components/ErrorBoundary";
import { FluxDispatcher, React, useRef, useState } from "@webpack/common";
import { ELEMENT_ID } from "../constants";
@@ -36,7 +37,7 @@ export interface MagnifierProps {
const cl = classNameFactory("vc-imgzoom-");
-export const Magnifier: React.FC
= ({ instance, size: initialSize, zoom: initalZoom }) => {
+export const Magnifier = ErrorBoundary.wrap(({ instance, size: initialSize, zoom: initalZoom }) => {
const [ready, setReady] = useState(false);
const [lensPosition, setLensPosition] = useState({ x: 0, y: 0 });
@@ -66,15 +67,18 @@ export const Magnifier: React.FC = ({ instance, size: initialSiz
}
};
const syncVideos = () => {
- currentVideoElementRef.current!.currentTime = originalVideoElementRef.current!.currentTime;
+ if (currentVideoElementRef.current && originalVideoElementRef.current)
+ currentVideoElementRef.current.currentTime = originalVideoElementRef.current.currentTime;
};
const updateMousePosition = (e: MouseEvent) => {
+ if (!element.current) return;
+
if (instance.state.mouseOver && instance.state.mouseDown) {
const offset = size.current / 2;
const pos = { x: e.pageX, y: e.pageY };
- const x = -((pos.x - element.current!.getBoundingClientRect().left) * zoom.current - offset);
- const y = -((pos.y - element.current!.getBoundingClientRect().top) * zoom.current - offset);
+ const x = -((pos.x - element.current.getBoundingClientRect().left) * zoom.current - offset);
+ const y = -((pos.y - element.current.getBoundingClientRect().top) * zoom.current - offset);
setLensPosition({ x: e.x - offset, y: e.y - offset });
setImagePosition({ x, y });
setOpacity(1);
@@ -183,6 +187,7 @@ export const Magnifier: React.FC = ({ instance, size: initialSiz
src={originalVideoElementRef.current?.src ?? instance.props.src}
autoPlay
loop
+ muted
/>
) : (
= ({ instance, size: initialSiz
)}
);
-};
+}, { noop: true });
diff --git a/src/plugins/implicitRelationships/README.md b/src/plugins/implicitRelationships/README.md
new file mode 100644
index 000000000..a76e298f7
--- /dev/null
+++ b/src/plugins/implicitRelationships/README.md
@@ -0,0 +1,7 @@
+# ImplicitRelationships
+
+Shows your implicit relationships in the Friends tab.
+
+Implicit relationships on Discord are people with whom you've frecently interacted and share a mutual server; even though Discord thinks you should be friends with them, you haven't added them as friends.
+
+![](https://camo.githubusercontent.com/6927161ee0c933f7ef6d61f243cca3e6ea4c8db9d1becd8cbf73c45e1bd0d127/68747470733a2f2f692e646f6c66692e65732f7055447859464662674d2e706e673f6b65793d736e3950343936416c32444c7072)
diff --git a/src/plugins/implicitRelationships/index.ts b/src/plugins/implicitRelationships/index.ts
new file mode 100644
index 000000000..4faad2a9d
--- /dev/null
+++ b/src/plugins/implicitRelationships/index.ts
@@ -0,0 +1,187 @@
+/*
+ * Vencord, a modification for Discord's desktop app
+ * Copyright (c) 2023 Vendicated and contributors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see