diff --git a/src/equicordplugins/boo/JumpscareOverlay.tsx b/src/equicordplugins/boo/JumpscareOverlay.tsx deleted file mode 100644 index 8dac73183..000000000 --- a/src/equicordplugins/boo/JumpscareOverlay.tsx +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Vencord, a Discord client mod - * Copyright (c) 2025 Vendicated and contributors - * SPDX-License-Identifier: GPL-3.0-or-later - */ - -import { createAudioPlayer } from "@api/AudioPlayer"; -import { classNameFactory } from "@api/Styles"; -import { React } from "@webpack/common"; - -const cl = classNameFactory("vc-boo-"); - -// GitHub raw URLs for hosted assets (from Equibored repository) -const JUMPSCARE_IMAGE_URL = "https://raw.githubusercontent.com/Equicord/Equibored/03e4650cc71591796d60c40d6105c31fce9bb481/icons/boo/job.png"; -const JUMPSCARE_SOUND_URL = "https://raw.githubusercontent.com/Equicord/Equibored/03e4650cc71591796d60c40d6105c31fce9bb481/sounds/boo/vine-boom.mp3"; - -interface JumpscareOverlayProps { - onClose: () => void; -} - -export function JumpscareOverlay({ onClose }: JumpscareOverlayProps) { - const audioPlayer = React.useRef(createAudioPlayer(JUMPSCARE_SOUND_URL, { volume: 100 })); - const [isClosing, setIsClosing] = React.useState(false); - - React.useEffect(() => { - try { - audioPlayer.current?.play(); - } catch (err) { - console.error("Failed to play jumpscare sound:", err); // scarier than a job application - } - - const timer = setTimeout(() => { - startClosing(); - }, 3000); - - return () => { - clearTimeout(timer); - audioPlayer.current?.stop(); - }; - }, [onClose]); - - const startClosing = () => { - setIsClosing(true); - setTimeout(() => { - onClose(); - }, 500); - }; - - const handleClick = () => { - audioPlayer.current?.stop(); - startClosing(); - }; - - return ( -
- Jumpscare -
- ); -} diff --git a/src/equicordplugins/boo/index.tsx b/src/equicordplugins/boo/index.tsx index 788af9592..7e48f6b16 100644 --- a/src/equicordplugins/boo/index.tsx +++ b/src/equicordplugins/boo/index.tsx @@ -19,47 +19,9 @@ import { ChannelStore, MessageStore, Tooltip, useEffect, UserStore, useState } f import { Boo, clearChannelFromGhost, getBooCount, getGhostedChannels, onBooCountChange } from "./Boo"; import { GhostedUsersModal } from "./GhostedUsersModal"; import { IconGhost } from "./IconGhost"; -import { JumpscareOverlay } from "./JumpscareOverlay"; export const cl = classNameFactory("vc-boo-"); -let jumpscareTimerId: NodeJS.Timeout | null = null; -let showJumpscareOverlay = false; -const jumpscareCallbacks: Set<() => void> = new Set(); - -function triggerJumpscare() { - showJumpscareOverlay = true; - for (const callback of jumpscareCallbacks) { - callback(); - } -} - -function closeJumpscare() { - showJumpscareOverlay = false; - for (const callback of jumpscareCallbacks) { - callback(); - } -} - -function resetJumpscareTimer() { - if (jumpscareTimerId) { - clearTimeout(jumpscareTimerId); - jumpscareTimerId = null; - } - - const count = getBooCount(); - if (count > 0 && settings.store.scary) { - // this is such a bad way to do this LMFAO - const milliseconds = 60 * 60 * 1000; - - jumpscareTimerId = setTimeout(() => { - if (getBooCount() > 0) { - triggerJumpscare(); - } - }, milliseconds); - } -} - export const settings = definePluginSettings({ showIndicator: { type: OptionType.BOOLEAN, @@ -79,12 +41,6 @@ export const settings = definePluginSettings({ default: "", restartNeeded: false }, - scary: { - type: OptionType.BOOLEAN, - description: "Something might happen if you ignore someone for too long...", - default: false, - restartNeeded: false - }, ignoreBots: { type: OptionType.BOOLEAN, description: "Ignore DMs from bots", @@ -120,25 +76,10 @@ function BooIndicator() { useEffect(() => { const unsubscribe = onBooCountChange(newCount => { setCount(newCount); - resetJumpscareTimer(); }); - // register jumpscare callback - const jumpscareCallback = () => { - setShowJumpscare(showJumpscareOverlay); - }; - jumpscareCallbacks.add(jumpscareCallback); - - // lucky lucky - resetJumpscareTimer(); - return () => { unsubscribe(); - jumpscareCallbacks.delete(jumpscareCallback); - if (jumpscareTimerId) { - clearTimeout(jumpscareTimerId); - jumpscareTimerId = null; - } }; }, []); @@ -173,7 +114,6 @@ function BooIndicator() { return ( <> - {showJumpscare && } {settings.store.showIndicator && (
diff --git a/src/plugins/_core/settings.tsx b/src/plugins/_core/settings.tsx index ade1b10fa..e500b18d1 100644 --- a/src/plugins/_core/settings.tsx +++ b/src/plugins/_core/settings.tsx @@ -207,7 +207,7 @@ export default definePlugin({ ["EquicordCloud", "equicord_cloud_panel"], ["EquicordBackupAndRestore", "equicord_backup_restore_panel"], ["EquicordPatchHelper", "equicord_patch_helper_panel"], - ["Equibop", "EquibopSettings", "equicord_equibop_settings_panel"], + ["EquibopSettings", "equicord_equibop_settings_panel"], ["EquicordDiscordIcons", "equicord_icon_viewer"], ["EquicordThemeLibrary", "equicord_theme_library"], ["EquicordIRememberYou", "equicord_i_remember_you"],