From 6862e0a590d182f32b2ed2453a684a28e306885e Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Tue, 29 Oct 2024 02:30:38 -0400 Subject: [PATCH] Make QuestCompleter Patch Reasonable --- README.md | 30 +++++--- src/components/PluginSettings/index.tsx | 2 +- .../index.tsx | 27 ++------ .../screenRecorder.web/index.tsx | 69 ------------------- 4 files changed, 25 insertions(+), 103 deletions(-) rename src/equicordplugins/{questCompleter => questCompleter.desktop}/index.tsx (91%) delete mode 100644 src/equicordplugins/screenRecorder.web/index.tsx diff --git a/README.md b/README.md index f17e31d5..6d7dfa34 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,9 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch ### Extra included plugins
-147 additional plugins +146 additional plugins +### All Platforms - AllCallTimers by MaxHerbold & D3SOX - AltKrispSwitch by newwares - AmITyping by MrDiamond @@ -84,9 +85,8 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch - JumpToStart by Samwich - KeyboardSounds by HypedDomi - KeywordNotify by camila314 & x3rt -- LimitMiddleClickPaste by nobody (Dev didnt put an author) +- LimitMiddleClickPaste by no dev listed - LoginWithQR by nexpid -- MediaDownloader by Colorman (Discord desktop only) - MediaPlaybackSpeed by D3SOX - Meow by Samwich - MessageColors by Hen @@ -111,7 +111,6 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch - PinIcon by iamme - PlatformSpoofer by Drag - PurgeMessages by bhop & nyx -- QuestCompleter by HappyEnderman & SerStars (Maintained by thororen) - QuestionMarkReplacement by nyx - Quoter by Samwich - RemixMe by kvba @@ -119,17 +118,14 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch - ReplaceActivityTypes by Nyako - ReplyPingControl by ant0n & MrDiamond - RPCStats by Samwich -- ScreenRecorder by AutumnVN (Vesktop & Equibop only) - SearchFix by Jaxx - SekaiStickers by MaiKokain - ServerSearch by camila314 -- Shakespearean by vmohammad (Dev build only) - ShowBadgesInChat by Inbestigator & KrystalSkull - SidebarChat by Joona - Slap by Korbo -- SoundBoardLogger by Moxxie, fres, echo (Maintained by thororen) +- SoundBoardLogger by Moxxie, fres, echo, maintained by thororen - StatusPresets by iamme -- StatusWhilePlaying by thororen (Desktop app only) - SteamStatusSync by niko - StickerBlocker by Samwich - TalkInReverse by Tolgchu @@ -149,9 +145,8 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch - VencordRPC by AutumnVN - VideoSpeed by Samwich - ViewRaw2 by Kyuuhachi -- VoiceChannelLog by Sqaaakoi (Maintained by thororen) +- VoiceChannelLog by Sqaaakoi & maintained by thororen - VoiceChatUtilities by D3SOX -- VoiceJoinMessages by Sqaaakoi (Maintained by thororen & Dev build only) - WebpackTarball by Kyuuhachi - WhosWatching by fres - WigglyText by nexpid @@ -159,6 +154,21 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch - WriteUpperCase by Samwich & KrystalSkull - YoutubeDescription by arHSM +### Web Only +- None At This Time + +### Vesktop & Equibop Only +- None At This Time + +### Discord Desktop Only +- MediaDownloader by Colorman +- QuestCompleter by HappyEnderman, SerStars, maintained by thororen +- StatusWhilePlaying by thororen + +### Equicord Devbuilds Only +- Shakespearean by vmohammad +- VoiceJoinMessages by Sqaaakoi & maintained by thororen +
diff --git a/src/components/PluginSettings/index.tsx b/src/components/PluginSettings/index.tsx index 0d3533b6..a6b7ddfb 100644 --- a/src/components/PluginSettings/index.tsx +++ b/src/components/PluginSettings/index.tsx @@ -196,7 +196,7 @@ function ExcludedPluginsList({ search }: { search: string; }) { discordDesktop: "Discord Desktop app", vencordDesktop: "Vesktop app", equicordDesktop: "Equibop app", - web: "Vesktop app and the Web version of Discord", + web: "Vesktop & Equibop apps as well as the Web version of Discord", dev: "Developer version of Equicord" }; diff --git a/src/equicordplugins/questCompleter/index.tsx b/src/equicordplugins/questCompleter.desktop/index.tsx similarity index 91% rename from src/equicordplugins/questCompleter/index.tsx rename to src/equicordplugins/questCompleter.desktop/index.tsx index 230fa151..fb4f68c4 100644 --- a/src/equicordplugins/questCompleter/index.tsx +++ b/src/equicordplugins/questCompleter.desktop/index.tsx @@ -23,7 +23,7 @@ import { getTheme, Theme } from "@utils/discord"; import { classes } from "@utils/misc"; import definePlugin from "@utils/types"; import { findByProps, findExportedComponentLazy } from "@webpack"; -import { Button, FluxDispatcher, RestAPI, Text, Tooltip, UserStore } from "@webpack/common"; +import { Button, FluxDispatcher, RestAPI, Tooltip, UserStore } from "@webpack/common"; const HeaderBarIcon = findExportedComponentLazy("Icon", "Divider"); const isApp = navigator.userAgent.includes("Electron/"); @@ -66,12 +66,7 @@ async function openCompleteQuestUI() { const QuestsStore = findByProps("getQuest"); const quest = [...QuestsStore.quests.values()].find(x => x.id !== "1248385850622869556" && x.userStatus?.enrolledAt && !x.userStatus?.completedAt && new Date(x.config.expiresAt).getTime() > Date.now()); - if (!isApp) { - showNotification({ - title: "Quests Completer", - body: "This no longer works in browser. Use the desktop app!", - }); - } else if (!quest) { + if (!quest) { showNotification({ title: "Quests Completer", body: "No Quests To Complete", @@ -197,8 +192,8 @@ export default definePlugin({ { find: "\"invite-button\"", replacement: { - match: /(function .+?\(.+?\){let{inPopout:.+allowIdle.+?}=.+?\.\i\)\("popup"\),(.+?)=\[\];if\(.+?\){.+"chat-spacer"\)\)\),\(\d,.+?\.jsx\)\(.+?,{children:).+?}}/, - replace: "$1[$self.renderQuestButton(),...$2]})}}" + match: /(\i\.Fragment,{children:)(\i\i)/, + replace: "$1[$self.renderQuestButton(),...$2]" } }, { @@ -239,19 +234,5 @@ export default definePlugin({ , e.toolbar, ]; - }, - settingsAboutComponent() { - return (<> - { - isApp ? - - The plugin should work properly because you are on the Desktop Client. - - : - - This plugin won't work because you are not on the Desktop Client. - - } - ); } }); diff --git a/src/equicordplugins/screenRecorder.web/index.tsx b/src/equicordplugins/screenRecorder.web/index.tsx deleted file mode 100644 index a9a0e646..00000000 --- a/src/equicordplugins/screenRecorder.web/index.tsx +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Vencord, a Discord client mod - * Copyright (c) 2023 Vendicated and contributors - * SPDX-License-Identifier: GPL-3.0-or-later - */ - -import { addContextMenuPatch, removeContextMenuPatch } from "@api/ContextMenu"; -import { ScreenshareIcon } from "@components/Icons"; -import { Devs } from "@utils/constants"; -import definePlugin from "@utils/types"; -import { findByPropsLazy } from "@webpack"; -import { Menu, UploadHandler } from "@webpack/common"; - -const OptionClasses = findByPropsLazy("optionName", "optionIcon", "optionLabel"); - -let recoder: MediaRecorder; - -export default definePlugin({ - name: "ScreenRecorder", - description: "epic screen recorder lol", - authors: [Devs.AutumnVN], - contextMenus: { - "channel-attach": startRecording - } -}); - -function startRecording(children) { - children.push( - - -
Start Recording
- - } - action={async () => { - const stream = await navigator.mediaDevices.getDisplayMedia({ audio: true, video: { frameRate: { ideal: 60 } } }); - recoder = new MediaRecorder(stream); - recoder.start(); - removeContextMenuPatch("channel-attach", startRecording); - addContextMenuPatch("channel-attach", stopRecording); - }} - /> - ); -} - -function stopRecording(children, props) { - children.push( - - -
Stop Recording
- - } - action={() => { - recoder.addEventListener("dataavailable", e => { - const file = new File([e.data], "watch if cute.webm", { type: "video/webm" }); - UploadHandler.promptToUpload([file], props.channel, 0); - }); - recoder.stop(); - removeContextMenuPatch("channel-attach", stopRecording); - addContextMenuPatch("channel-attach", startRecording); - }} - /> - ); -}