Plugin
F8Break
Pause the client when you press F8 with DevTools (+ breakpoints) open.
1
/*2
* FiveCord — a Discord client mod3
* Copyright (c) 2025 FiveCord4
* SPDX-License-Identifier: GPL-3.0-or-later5
*/6
7
import { Devs } from "@utils/constants";8
import definePlugin from "@utils/types";9
10
export default definePlugin({11
name: "F8Break",12
description: "Pause the client when you press F8 with DevTools (+ breakpoints) open.",13
tags: ["Developers", "Shortcuts"],14
authors: [Devs.lewisakura],15
16
start() {17
window.addEventListener("keydown", this.event);18
},19
20
stop() {21
window.removeEventListener("keydown", this.event);22
},23
24
event(e: KeyboardEvent) {25
if (e.code === "F8") {26
// Hi! You've just paused the client. Pressing F8 in DevTools or in the main window will unpause it again.27
// It's up to you on what to do, friend. Happy travels!28
debugger;29
}30
}31
});32