mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-15 09:33:03 -04:00
Make QuestCompleter Patch Reasonable
This commit is contained in:
parent
f2f7d3ad56
commit
6862e0a590
4 changed files with 25 additions and 103 deletions
30
README.md
30
README.md
|
@ -10,8 +10,9 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch
|
||||||
|
|
||||||
### Extra included plugins
|
### Extra included plugins
|
||||||
<details>
|
<details>
|
||||||
<summary>147 additional plugins</summary>
|
<summary>146 additional plugins</summary>
|
||||||
|
|
||||||
|
### All Platforms
|
||||||
- AllCallTimers by MaxHerbold & D3SOX
|
- AllCallTimers by MaxHerbold & D3SOX
|
||||||
- AltKrispSwitch by newwares
|
- AltKrispSwitch by newwares
|
||||||
- AmITyping by MrDiamond
|
- AmITyping by MrDiamond
|
||||||
|
@ -84,9 +85,8 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch
|
||||||
- JumpToStart by Samwich
|
- JumpToStart by Samwich
|
||||||
- KeyboardSounds by HypedDomi
|
- KeyboardSounds by HypedDomi
|
||||||
- KeywordNotify by camila314 & x3rt
|
- KeywordNotify by camila314 & x3rt
|
||||||
- LimitMiddleClickPaste by nobody (Dev didnt put an author)
|
- LimitMiddleClickPaste by no dev listed
|
||||||
- LoginWithQR by nexpid
|
- LoginWithQR by nexpid
|
||||||
- MediaDownloader by Colorman (Discord desktop only)
|
|
||||||
- MediaPlaybackSpeed by D3SOX
|
- MediaPlaybackSpeed by D3SOX
|
||||||
- Meow by Samwich
|
- Meow by Samwich
|
||||||
- MessageColors by Hen
|
- MessageColors by Hen
|
||||||
|
@ -111,7 +111,6 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch
|
||||||
- PinIcon by iamme
|
- PinIcon by iamme
|
||||||
- PlatformSpoofer by Drag
|
- PlatformSpoofer by Drag
|
||||||
- PurgeMessages by bhop & nyx
|
- PurgeMessages by bhop & nyx
|
||||||
- QuestCompleter by HappyEnderman & SerStars (Maintained by thororen)
|
|
||||||
- QuestionMarkReplacement by nyx
|
- QuestionMarkReplacement by nyx
|
||||||
- Quoter by Samwich
|
- Quoter by Samwich
|
||||||
- RemixMe by kvba
|
- RemixMe by kvba
|
||||||
|
@ -119,17 +118,14 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch
|
||||||
- ReplaceActivityTypes by Nyako
|
- ReplaceActivityTypes by Nyako
|
||||||
- ReplyPingControl by ant0n & MrDiamond
|
- ReplyPingControl by ant0n & MrDiamond
|
||||||
- RPCStats by Samwich
|
- RPCStats by Samwich
|
||||||
- ScreenRecorder by AutumnVN (Vesktop & Equibop only)
|
|
||||||
- SearchFix by Jaxx
|
- SearchFix by Jaxx
|
||||||
- SekaiStickers by MaiKokain
|
- SekaiStickers by MaiKokain
|
||||||
- ServerSearch by camila314
|
- ServerSearch by camila314
|
||||||
- Shakespearean by vmohammad (Dev build only)
|
|
||||||
- ShowBadgesInChat by Inbestigator & KrystalSkull
|
- ShowBadgesInChat by Inbestigator & KrystalSkull
|
||||||
- SidebarChat by Joona
|
- SidebarChat by Joona
|
||||||
- Slap by Korbo
|
- Slap by Korbo
|
||||||
- SoundBoardLogger by Moxxie, fres, echo (Maintained by thororen)
|
- SoundBoardLogger by Moxxie, fres, echo, maintained by thororen
|
||||||
- StatusPresets by iamme
|
- StatusPresets by iamme
|
||||||
- StatusWhilePlaying by thororen (Desktop app only)
|
|
||||||
- SteamStatusSync by niko
|
- SteamStatusSync by niko
|
||||||
- StickerBlocker by Samwich
|
- StickerBlocker by Samwich
|
||||||
- TalkInReverse by Tolgchu
|
- TalkInReverse by Tolgchu
|
||||||
|
@ -149,9 +145,8 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch
|
||||||
- VencordRPC by AutumnVN
|
- VencordRPC by AutumnVN
|
||||||
- VideoSpeed by Samwich
|
- VideoSpeed by Samwich
|
||||||
- ViewRaw2 by Kyuuhachi
|
- ViewRaw2 by Kyuuhachi
|
||||||
- VoiceChannelLog by Sqaaakoi (Maintained by thororen)
|
- VoiceChannelLog by Sqaaakoi & maintained by thororen
|
||||||
- VoiceChatUtilities by D3SOX
|
- VoiceChatUtilities by D3SOX
|
||||||
- VoiceJoinMessages by Sqaaakoi (Maintained by thororen & Dev build only)
|
|
||||||
- WebpackTarball by Kyuuhachi
|
- WebpackTarball by Kyuuhachi
|
||||||
- WhosWatching by fres
|
- WhosWatching by fres
|
||||||
- WigglyText by nexpid
|
- WigglyText by nexpid
|
||||||
|
@ -159,6 +154,21 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch
|
||||||
- WriteUpperCase by Samwich & KrystalSkull
|
- WriteUpperCase by Samwich & KrystalSkull
|
||||||
- YoutubeDescription by arHSM
|
- 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
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -196,7 +196,7 @@ function ExcludedPluginsList({ search }: { search: string; }) {
|
||||||
discordDesktop: "Discord Desktop app",
|
discordDesktop: "Discord Desktop app",
|
||||||
vencordDesktop: "Vesktop app",
|
vencordDesktop: "Vesktop app",
|
||||||
equicordDesktop: "Equibop 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"
|
dev: "Developer version of Equicord"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ import { getTheme, Theme } from "@utils/discord";
|
||||||
import { classes } from "@utils/misc";
|
import { classes } from "@utils/misc";
|
||||||
import definePlugin from "@utils/types";
|
import definePlugin from "@utils/types";
|
||||||
import { findByProps, findExportedComponentLazy } from "@webpack";
|
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 HeaderBarIcon = findExportedComponentLazy("Icon", "Divider");
|
||||||
const isApp = navigator.userAgent.includes("Electron/");
|
const isApp = navigator.userAgent.includes("Electron/");
|
||||||
|
|
||||||
|
@ -66,12 +66,7 @@ async function openCompleteQuestUI() {
|
||||||
const QuestsStore = findByProps("getQuest");
|
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());
|
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) {
|
if (!quest) {
|
||||||
showNotification({
|
|
||||||
title: "Quests Completer",
|
|
||||||
body: "This no longer works in browser. Use the desktop app!",
|
|
||||||
});
|
|
||||||
} else if (!quest) {
|
|
||||||
showNotification({
|
showNotification({
|
||||||
title: "Quests Completer",
|
title: "Quests Completer",
|
||||||
body: "No Quests To Complete",
|
body: "No Quests To Complete",
|
||||||
|
@ -197,8 +192,8 @@ export default definePlugin({
|
||||||
{
|
{
|
||||||
find: "\"invite-button\"",
|
find: "\"invite-button\"",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /(function .+?\(.+?\){let{inPopout:.+allowIdle.+?}=.+?\.\i\)\("popup"\),(.+?)=\[\];if\(.+?\){.+"chat-spacer"\)\)\),\(\d,.+?\.jsx\)\(.+?,{children:).+?}}/,
|
match: /(\i\.Fragment,{children:)(\i\i)/,
|
||||||
replace: "$1[$self.renderQuestButton(),...$2]})}}"
|
replace: "$1[$self.renderQuestButton(),...$2]"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -239,19 +234,5 @@ export default definePlugin({
|
||||||
</ErrorBoundary>,
|
</ErrorBoundary>,
|
||||||
e.toolbar,
|
e.toolbar,
|
||||||
];
|
];
|
||||||
},
|
|
||||||
settingsAboutComponent() {
|
|
||||||
return (<>
|
|
||||||
{
|
|
||||||
isApp ?
|
|
||||||
<Text variant="text-lg/bold">
|
|
||||||
The plugin should work properly because you are on the Desktop Client.
|
|
||||||
</Text>
|
|
||||||
:
|
|
||||||
<Text variant="text-lg/bold">
|
|
||||||
This plugin won't work because you are not on the Desktop Client.
|
|
||||||
</Text>
|
|
||||||
}
|
|
||||||
</>);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
|
@ -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(
|
|
||||||
<Menu.MenuItem
|
|
||||||
id="start-recording"
|
|
||||||
label={
|
|
||||||
<div className={OptionClasses.optionLabel}>
|
|
||||||
<ScreenshareIcon className={OptionClasses.optionIcon} height={24} width={24} />
|
|
||||||
<div className={OptionClasses.optionName}>Start Recording</div>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
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(
|
|
||||||
<Menu.MenuItem
|
|
||||||
id="stop-recording"
|
|
||||||
label={
|
|
||||||
<div className={OptionClasses.optionLabel}>
|
|
||||||
<ScreenshareIcon className={OptionClasses.optionIcon} height={24} width={24} />
|
|
||||||
<div className={OptionClasses.optionName}>Stop Recording</div>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
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);
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue