1
0
Fork 1
mirror of https://github.com/Vendicated/Vencord.git synced 2025-01-26 09:16:24 +00:00

ImageZoom: Fix incorrectly adding context menu in some places (#3150)

This commit is contained in:
sadan4 2025-01-24 19:11:26 -05:00 committed by Nuckyz
parent 4036fbab92
commit aac5242dc8
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9

View file

@ -81,7 +81,12 @@ export const settings = definePluginSettings({
});
const imageContextMenuPatch: NavContextMenuPatchCallback = children => {
const imageContextMenuPatch: NavContextMenuPatchCallback = (children, props) => {
// Discord re-uses the image context menu for links to for the copy and open buttons
if ("href" in props) return;
// emojis in user statuses
if (props.target?.classList?.contains("emoji")) return;
const { square, nearestNeighbour } = settings.use(["square", "nearestNeighbour"]);
children.push(