diff --git a/README.md b/README.md index cd18e0017..55e828c6d 100644 --- a/README.md +++ b/README.md @@ -142,6 +142,7 @@ You can join our [discord server](https://discord.gg/equicord-117327988606502929 - PlatformSpoofer by Drag - PolishWording by Samwich - PurgeMessages by bhop & nyx +- QuestFocused by secp192k1 - QuestionMarkReplacement by nyx - Quoter by Samwich - RandomVoice by xijexo, omaw, thororen diff --git a/src/equicordplugins/questFocused/index.tsx b/src/equicordplugins/questFocused/index.tsx new file mode 100644 index 000000000..98bae610c --- /dev/null +++ b/src/equicordplugins/questFocused/index.tsx @@ -0,0 +1,39 @@ +/* + * Vencord, a Discord client mod + * Copyright (c) 2024 Vendicated and contributors + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +import "@equicordplugins/_misc/styles.css"; + +import { EquicordDevs } from "@utils/constants"; +import definePlugin from "@utils/types"; +import { Forms } from "@webpack/common"; + +export default definePlugin({ + name: "QuestFocused", + description: "Prevent the quests player from pausing and possibly skip it all together.", + settingsAboutComponent: () => <> + + You might need to spam left mouse button on the video to skip it. + + , + authors: [EquicordDevs.secp192k1], + patches: [ + // Block pausing + { + find: "[QV] | updatePlayerState | playerState", + replacement: { + match: /(?<=case \i\.\i\.PAUSED:.{0,25})\i\.current\.pause\(\),/, + replace: "" + } + }, + { + find: "[QV] | updatePlayerState | playerState:", + replacement: { + match: /(?<=case \i\.\i\.PLAYING:)\i\.current\.paused/, + replace: "false" + } + }, + ], +}); diff --git a/src/utils/constants.ts b/src/utils/constants.ts index a0cf15e0e..14b74b821 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -1108,6 +1108,10 @@ export const EquicordDevs = Object.freeze({ veygax: { name: "veygax", id: 1119938236245094521n + }, + secp192k1: { + name: "secp192k1", + id: 477497542205243392n } } satisfies Record);