From 69878952a09b9b3937eae2d13137465ec2046e39 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Mon, 17 Mar 2025 13:26:12 -0400 Subject: [PATCH] Equissant --- src/equicordplugins/demonstration/index.tsx | 2 +- src/equicordplugins/equissant/index.ts | 43 +++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 src/equicordplugins/equissant/index.ts diff --git a/src/equicordplugins/demonstration/index.tsx b/src/equicordplugins/demonstration/index.tsx index 598171da..8befd47e 100644 --- a/src/equicordplugins/demonstration/index.tsx +++ b/src/equicordplugins/demonstration/index.tsx @@ -138,7 +138,7 @@ export default definePlugin({ settingsAboutComponent: () => { return ( <> - To change your keycode, check out this tool! + To change your keycode, check out this tool! ); }, diff --git a/src/equicordplugins/equissant/index.ts b/src/equicordplugins/equissant/index.ts new file mode 100644 index 00000000..eb484ac6 --- /dev/null +++ b/src/equicordplugins/equissant/index.ts @@ -0,0 +1,43 @@ +/* + * Vencord, a modification for Discord's desktop app + * Copyright (c) 2022 Vendicated and Megumin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . +*/ + +import { EquicordDevs } from "@utils/constants"; +import definePlugin from "@utils/types"; + +let clickCount = 0; + +function play() { + clickCount++; + + if (clickCount % 10 === 0) { + const audio = new Audio("https://github.com/Equicord/Equibored/raw/main/sounds/equissant/croissant.mp3"); + audio.play(); + } +} + +export default definePlugin({ + name: "Equissant", + description: "Crossant every 10 clicks :trolley:", + authors: [EquicordDevs.SomeAspy, EquicordDevs.thororen], + start() { + document.addEventListener("click", play); + }, + stop() { + document.removeEventListener("click", play); + } +});