mirror of
https://github.com/Equicord/Equicord.git
synced 2025-01-18 21:33:35 -05:00
Quick Fix
This commit is contained in:
parent
1344d0a15f
commit
07759183a9
1 changed files with 13 additions and 15 deletions
|
@ -16,7 +16,6 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Settings } from "@api/Settings";
|
|
||||||
import { Devs } from "@utils/constants";
|
import { Devs } from "@utils/constants";
|
||||||
import definePlugin, { OptionType } from "@utils/types";
|
import definePlugin, { OptionType } from "@utils/types";
|
||||||
|
|
||||||
|
@ -28,19 +27,6 @@ let sounds = {
|
||||||
backspace
|
backspace
|
||||||
};
|
};
|
||||||
|
|
||||||
if (Settings.plugins.KeyboardSounds.enabled) {
|
|
||||||
click1 = new Audio("https://github.com/HypedDomi/Vencord-Plugins/raw/main/Keyboard-Sounds/sounds/click1.wav");
|
|
||||||
click2 = new Audio("https://github.com/HypedDomi/Vencord-Plugins/raw/main/Keyboard-Sounds/sounds/click2.wav");
|
|
||||||
click3 = new Audio("https://github.com/HypedDomi/Vencord-Plugins/raw/main/Keyboard-Sounds/sounds/click3.wav");
|
|
||||||
backspace = new Audio("https://github.com/HypedDomi/Vencord-Plugins/raw/main/Keyboard-Sounds/sounds/backspace.wav");
|
|
||||||
sounds = {
|
|
||||||
click1,
|
|
||||||
click2,
|
|
||||||
click3,
|
|
||||||
backspace,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
const ignoredKeys = ["CapsLock", "ShiftLeft", "ShiftRight", "ControlLeft", "ControlRight", "AltLeft", "AltRight", "MetaLeft", "MetaRight", "ArrowUp", "ArrowRight", "ArrowLeft", "ArrowDown", "MediaPlayPause", "MediaStop", "MediaTrackNext", "MediaTrackPrevious", "MediaSelect", "MediaEject", "MediaVolumeUp", "MediaVolumeDown", "AudioVolumeUp", "AudioVolumeDown"];
|
const ignoredKeys = ["CapsLock", "ShiftLeft", "ShiftRight", "ControlLeft", "ControlRight", "AltLeft", "AltRight", "MetaLeft", "MetaRight", "ArrowUp", "ArrowRight", "ArrowLeft", "ArrowDown", "MediaPlayPause", "MediaStop", "MediaTrackNext", "MediaTrackPrevious", "MediaSelect", "MediaEject", "MediaVolumeUp", "MediaVolumeDown", "AudioVolumeUp", "AudioVolumeDown"];
|
||||||
|
|
||||||
const keydown = (e: KeyboardEvent) => {
|
const keydown = (e: KeyboardEvent) => {
|
||||||
|
@ -60,7 +46,19 @@ export default definePlugin({
|
||||||
name: "Keyboard Sounds",
|
name: "Keyboard Sounds",
|
||||||
description: "Adds the Opera GX Keyboard Sounds to Discord",
|
description: "Adds the Opera GX Keyboard Sounds to Discord",
|
||||||
authors: [Devs.HypedDomi],
|
authors: [Devs.HypedDomi],
|
||||||
start: () => document.addEventListener("keydown", keydown),
|
start: () => {
|
||||||
|
click1 = new Audio("https://github.com/HypedDomi/Vencord-Plugins/raw/main/Keyboard-Sounds/sounds/click1.wav");
|
||||||
|
click2 = new Audio("https://github.com/HypedDomi/Vencord-Plugins/raw/main/Keyboard-Sounds/sounds/click2.wav");
|
||||||
|
click3 = new Audio("https://github.com/HypedDomi/Vencord-Plugins/raw/main/Keyboard-Sounds/sounds/click3.wav");
|
||||||
|
backspace = new Audio("https://github.com/HypedDomi/Vencord-Plugins/raw/main/Keyboard-Sounds/sounds/backspace.wav");
|
||||||
|
sounds = {
|
||||||
|
click1,
|
||||||
|
click2,
|
||||||
|
click3,
|
||||||
|
backspace,
|
||||||
|
};
|
||||||
|
document.addEventListener("keydown", keydown);
|
||||||
|
},
|
||||||
stop: () => document.removeEventListener("keydown", keydown),
|
stop: () => document.removeEventListener("keydown", keydown),
|
||||||
options: {
|
options: {
|
||||||
volume: {
|
volume: {
|
||||||
|
|
Loading…
Reference in a new issue