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