From a9d2c876186be2a9ec97cfcb275eb4eacd56bb58 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Thu, 10 Oct 2024 10:30:39 -0400 Subject: [PATCH] Fix Stupid Check For WebContextMenus --- src/plugins/webContextMenus.web/index.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/plugins/webContextMenus.web/index.ts b/src/plugins/webContextMenus.web/index.ts index 7864c94ad..5322ad821 100644 --- a/src/plugins/webContextMenus.web/index.ts +++ b/src/plugins/webContextMenus.web/index.ts @@ -31,6 +31,15 @@ async function fetchImage(url: string) { return await res.blob(); } +let result; +if (IS_VESKTOP) { + result = IS_VESKTOP; +} else if (IS_EQUIBOP) { + result = IS_EQUIBOP; +} else { + result = false; +} + const settings = definePluginSettings({ // This needs to be all in one setting because to enable any of these, we need to make Discord use their desktop context @@ -40,7 +49,7 @@ const settings = definePluginSettings({ description: "Add back the Discord context menus for images, links and the chat input bar", // Web slate menu has proper spellcheck suggestions and image context menu is also pretty good, // so disable this by default. Vesktop just doesn't, so enable by default - default: IS_VESKTOP && !IS_EQUIBOP || !IS_VESKTOP && IS_EQUIBOP, + default: result, restartNeeded: true } }); @@ -72,7 +81,7 @@ export default definePlugin({ description: "Re-adds context menus missing in the web version of Discord: Links & Images (Copy/Open Link/Image), Text Area (Copy, Cut, Paste, SpellCheck)", authors: [Devs.Ven], enabledByDefault: true, - required: IS_VESKTOP || IS_EQUIBOP, + required: result, settings,