Add files via upload

This commit is contained in:
Cube14yt 2025-11-27 20:56:39 +08:00 committed by GitHub
parent 961f3e297b
commit b145474432
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 21 additions and 0 deletions

21
mods/mobile_keybinds.js Normal file
View File

@ -0,0 +1,21 @@
(() => {
function runKeybind() {
promptInput("Input the keybind you want to run. (e.g. KeyA, Digit1, Backspace)", (keybind) => {
if (keybinds[keybind]) {
keybinds[keybind]();
}
})
}
if (isMobile) {
const keybindButton = document.createElement("button")
keybindButton.id = "keybindButton"
keybindButton.title = "Change static mode"
keybindButton.classList.add("controlButton")
keybindButton.onclick = () => {
runKeybind()
}
keybindButton.textContent = "Keybind"
document.getElementById("pauseButton").before(keybindButton)
}
})()