mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-02-24 15:35:11 +00:00
ImageZoom: Fix incorrectly adding context menu in some places (#3150)
This commit is contained in:
parent
4036fbab92
commit
e19937d437
1 changed files with 6 additions and 1 deletions
|
@ -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 != null && [...props.target.classList].some(x => x === "emoji")) return;
|
||||
|
||||
const { square, nearestNeighbour } = settings.use(["square", "nearestNeighbour"]);
|
||||
|
||||
children.push(
|
||||
|
|
Loading…
Add table
Reference in a new issue