From 11321eb693858a88665b5801ce173e7ebd6c68c4 Mon Sep 17 00:00:00 2001 From: v Date: Fri, 29 Nov 2024 16:11:55 +0100 Subject: [PATCH 1/5] Update CONTRIBUTING.md Plugins interacting with specific Discord bots are not allowed. --- CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6c133225..0146065e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,6 +31,7 @@ Before starting your plugin: - No FakeDeafen or FakeMute - No StereoMic - No plugins that simply hide or redesign ui elements. This can be done with CSS +- No plugins that interact with specific Discord bots (official Discord apps like Youtube WatchTogether are okay) - No selfbots or API spam (animated status, message pruner, auto reply, nitro snipers, etc) - No untrusted third party APIs. Popular services like Google or GitHub are fine, but absolutely no self hosted ones - No plugins that require the user to enter their own API key From 1150a503554b1a366e602b4ae27cacf424369851 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Fri, 29 Nov 2024 22:46:28 +0100 Subject: [PATCH 2/5] Badges: fix overflow in Discord's css --- src/plugins/_api/badges/fixDiscordBadgePadding.css | 5 +++++ src/plugins/_api/badges/index.tsx | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 src/plugins/_api/badges/fixDiscordBadgePadding.css diff --git a/src/plugins/_api/badges/fixDiscordBadgePadding.css b/src/plugins/_api/badges/fixDiscordBadgePadding.css new file mode 100644 index 00000000..eb1d60d5 --- /dev/null +++ b/src/plugins/_api/badges/fixDiscordBadgePadding.css @@ -0,0 +1,5 @@ +/* the profile popout badge container(s) */ +[class*="biteSize_"] [class*="tags_"] [class*="container_"] { + /* Discord has padding set to 2px instead of 1px, which causes the 12th badge to wrap to a new line. */ + padding: 0 1px; +} diff --git a/src/plugins/_api/badges/index.tsx b/src/plugins/_api/badges/index.tsx index c44d98b9..d02b5e1d 100644 --- a/src/plugins/_api/badges/index.tsx +++ b/src/plugins/_api/badges/index.tsx @@ -16,6 +16,8 @@ * along with this program. If not, see . */ +import "./fixDiscordBadgePadding.css"; + import { _getBadges, BadgePosition, BadgeUserArgs, ProfileBadge } from "@api/Badges"; import DonateButton from "@components/DonateButton"; import ErrorBoundary from "@components/ErrorBoundary"; From 02f50b161b0fda1686bbba71e4ef53bfee9dd124 Mon Sep 17 00:00:00 2001 From: sadan4 <117494111+sadan4@users.noreply.github.com> Date: Fri, 29 Nov 2024 17:26:10 -0500 Subject: [PATCH 3/5] ImageZoom: Fix zoom level not saving (#3054) --- src/plugins/imageZoom/components/Magnifier.tsx | 18 +++++++++++------- src/webpack/common/react.ts | 3 ++- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/plugins/imageZoom/components/Magnifier.tsx b/src/plugins/imageZoom/components/Magnifier.tsx index 585026d6..31fa7a11 100644 --- a/src/plugins/imageZoom/components/Magnifier.tsx +++ b/src/plugins/imageZoom/components/Magnifier.tsx @@ -18,7 +18,7 @@ import { classNameFactory } from "@api/Styles"; import ErrorBoundary from "@components/ErrorBoundary"; -import { FluxDispatcher, React, useRef, useState } from "@webpack/common"; +import { FluxDispatcher, useLayoutEffect, useRef, useState } from "@webpack/common"; import { ELEMENT_ID } from "../constants"; import { settings } from "../index"; @@ -55,7 +55,7 @@ export const Magnifier = ErrorBoundary.wrap(({ instance, size: i const imageRef = useRef(null); // since we accessing document im gonna use useLayoutEffect - React.useLayoutEffect(() => { + useLayoutEffect(() => { const onKeyDown = (e: KeyboardEvent) => { if (e.key === "Shift") { isShiftDown.current = true; @@ -135,12 +135,14 @@ export const Magnifier = ErrorBoundary.wrap(({ instance, size: i setReady(true); }); + document.addEventListener("keydown", onKeyDown); document.addEventListener("keyup", onKeyUp); document.addEventListener("mousemove", updateMousePosition); document.addEventListener("mousedown", onMouseDown); document.addEventListener("mouseup", onMouseUp); document.addEventListener("wheel", onWheel); + return () => { document.removeEventListener("keydown", onKeyDown); document.removeEventListener("keyup", onKeyUp); @@ -148,14 +150,16 @@ export const Magnifier = ErrorBoundary.wrap(({ instance, size: i document.removeEventListener("mousedown", onMouseDown); document.removeEventListener("mouseup", onMouseUp); document.removeEventListener("wheel", onWheel); - - if (settings.store.saveZoomValues) { - settings.store.zoom = zoom.current; - settings.store.size = size.current; - } }; }, []); + useLayoutEffect(() => () => { + if (settings.store.saveZoomValues) { + settings.store.zoom = zoom.current; + settings.store.size = size.current; + } + }); + if (!ready) return null; const box = element.current?.getBoundingClientRect(); diff --git a/src/webpack/common/react.ts b/src/webpack/common/react.ts index 17196132..99f3f9dd 100644 --- a/src/webpack/common/react.ts +++ b/src/webpack/common/react.ts @@ -22,6 +22,7 @@ import { findByPropsLazy, waitFor } from "../webpack"; export let React: typeof import("react"); export let useState: typeof React.useState; export let useEffect: typeof React.useEffect; +export let useLayoutEffect: typeof React.useLayoutEffect; export let useMemo: typeof React.useMemo; export let useRef: typeof React.useRef; export let useReducer: typeof React.useReducer; @@ -31,5 +32,5 @@ export const ReactDOM: typeof import("react-dom") & typeof import("react-dom/cli waitFor("useState", m => { React = m; - ({ useEffect, useState, useMemo, useRef, useReducer, useCallback } = React); + ({ useEffect, useState, useLayoutEffect, useMemo, useRef, useReducer, useCallback } = React); }); From fcece6199511108f7f9eeec65a6d9120f720deb2 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Fri, 29 Nov 2024 19:26:55 -0300 Subject: [PATCH 4/5] Bump to 1.10.8 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d5b23e57..967c0ccc 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "vencord", "private": "true", - "version": "1.10.7", + "version": "1.10.8", "description": "The cutest Discord client mod", "homepage": "https://github.com/Vendicated/Vencord#readme", "bugs": { From 893e86dd5a0b42f3d7e94d325c4407b8f42e325c Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Fri, 29 Nov 2024 18:19:54 -0500 Subject: [PATCH 5/5] Privacy Policy --- PRIVACY_POLICY.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 PRIVACY_POLICY.md diff --git a/PRIVACY_POLICY.md b/PRIVACY_POLICY.md new file mode 100644 index 00000000..5d2fc624 --- /dev/null +++ b/PRIVACY_POLICY.md @@ -0,0 +1 @@ +Equicord is designed with user privacy in mind and doesn’t collect or share any personal data. Since it’s an extension for Discord, it operates entirely within the Discord platform. This means all interactions and data management follow Discord’s privacy policies, which you can check out at [discord.com/privacy](https://discord.com/privacy/). So, while Equicord doesn’t handle your data, it’s a good idea to review Discord’s policy to understand how your information is managed. This setup ensures transparency and follows standard practices for third-party tools working within larger platforms.