formatting

This commit is contained in:
raven 2022-12-22 00:03:10 -05:00
parent de53661ff2
commit a549671e70

View File

@ -53,7 +53,7 @@
console.log(e) console.log(e)
e = e || window.event; e = e || window.event;
// Handle
if (e.key == "w" || e.code == "Numpad8") { if (e.key == "w" || e.code == "Numpad8") {
fetch(rootURL + "/up") fetch(rootURL + "/up")
.then(function (response) { .then(function (response) {
@ -64,7 +64,6 @@
}) })
} }
// Handle
if (e.key == "a" || e.code == "Numpad4") { if (e.key == "a" || e.code == "Numpad4") {
fetch(rootURL + "/left") fetch(rootURL + "/left")
.then(function (response) { .then(function (response) {
@ -74,7 +73,7 @@
if (data == 1) return console.log("Command: LEFT - SENT!") if (data == 1) return console.log("Command: LEFT - SENT!")
}) })
} }
// Handle
if (e.key == "s" || e.key == "2") { if (e.key == "s" || e.key == "2") {
fetch(rootURL + "/down") fetch(rootURL + "/down")
.then(function (response) { .then(function (response) {
@ -84,8 +83,7 @@
if (data == 1) return console.log("Command: DOWN - SENT!") if (data == 1) return console.log("Command: DOWN - SENT!")
}) })
} }
// Handle
// Handle
if (e.key == "d" || e.code == "Numpad6") { if (e.key == "d" || e.code == "Numpad6") {
fetch(rootURL + "/right") fetch(rootURL + "/right")
.then(function (response) { .then(function (response) {
@ -105,6 +103,7 @@
if (data == 1) return console.log("Command: ENTER - SENT!") if (data == 1) return console.log("Command: ENTER - SENT!")
}) })
} }
if (e.key == "x" || e.code == "NumpadDecimal") { if (e.key == "x" || e.code == "NumpadDecimal") {
fetch(rootURL + "/back") fetch(rootURL + "/back")
.then(function (response) { .then(function (response) {
@ -146,7 +145,6 @@
} }
if (e.key == "m" || e.code == "Numpad0") { if (e.key == "m" || e.code == "Numpad0") {
fetch(rootURL + "/mute") fetch(rootURL + "/mute")
.then(function (response) { .then(function (response) {