formatting

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

View File

@ -5,7 +5,7 @@
<head></head>
<title>Samsung TVController</title>
<style>
<style>
body {
background-color: #101010;
color: #ffffff;
@ -22,8 +22,8 @@
footer {
color: #ffffff;
}
</style>
<script>
</style>
<script>
let rootURL = "https://grwh.work:3031"
let pass = prompt("Enter the password!", "");
let text;
@ -53,8 +53,8 @@
console.log(e)
e = e || window.event;
// Handle
if (e.key == "w" || e.code == "Numpad8" ) {
if (e.key == "w" || e.code == "Numpad8") {
fetch(rootURL + "/up")
.then(function (response) {
return response.json();
@ -64,9 +64,8 @@
})
}
// Handle
if (e.key == "a" || e.code == "Numpad4") {
fetch(rootURL + "/left" )
fetch(rootURL + "/left")
.then(function (response) {
return response.json();
})
@ -74,7 +73,7 @@
if (data == 1) return console.log("Command: LEFT - SENT!")
})
}
// Handle
if (e.key == "s" || e.key == "2") {
fetch(rootURL + "/down")
.then(function (response) {
@ -84,10 +83,9 @@
if (data == 1) return console.log("Command: DOWN - SENT!")
})
}
// Handle
// Handle
if (e.key == "d" || e.code == "Numpad6") {
fetch(rootURL + "/right" )
fetch(rootURL + "/right")
.then(function (response) {
return response.json();
})
@ -105,6 +103,7 @@
if (data == 1) return console.log("Command: ENTER - SENT!")
})
}
if (e.key == "x" || e.code == "NumpadDecimal") {
fetch(rootURL + "/back")
.then(function (response) {
@ -146,7 +145,6 @@
}
if (e.key == "m" || e.code == "Numpad0") {
fetch(rootURL + "/mute")
.then(function (response) {
@ -184,13 +182,13 @@
document.getElementById("view").innerHTML = "<meta http-equiv=\"refresh\" content=3;> <CENTER>THE PASSWORD PROVIDED WAS INCORRECT!"
}
})
</script>
</head>
</script>
</head>
<body>
<body>
<center>
<div id="view"></div>
<center>
</body>
</body>
</html>