moving pic mode to l key, renaming dir and filename

This commit is contained in:
raven 2022-12-21 21:29:12 -05:00
parent e2122a1715
commit c9fca96392
2 changed files with 10 additions and 4 deletions

View File

@ -1,6 +1,7 @@
<!DOCTYPE html>
<html>
<!--Hello! You have found my TV Controller. The API provided in this source is behind a firewall and will be of no use to you. Move along!-->
<!--Hello! You have found my TV Controller. The API provided in this source is behind a firewall and will be of no use to you. Move along!-->
<head></head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
@ -41,7 +42,7 @@
if (pass == null || pass == "") {
document.getElementById("view").innerHTML = "<meta http-equiv=\"refresh\" content=0;>"
} else {
document.getElementById("view").innerHTML = "CURRENT COMMAND SHORTCUTS: <BR>HOME: H<BR> UP: W<BR> LEFT: A<BR> DOWN: S <BR> RIGHT: D<BR> Back: X<BR> Volume Up: P<BR> Volume Down: O<BR>MUTE: M<BR> Enter: Enter<BR>Picture Mode: P<BR><BR>Not Working? Issue a new Token using: r";
document.getElementById("view").innerHTML = "CURRENT COMMAND SHORTCUTS: <BR>HOME: H<BR> UP: W<BR> LEFT: A<BR> DOWN: S <BR> RIGHT: D<BR> Back: X<BR> Volume Up: P<BR> Volume Down: O<BR>MUTE: M<BR> Enter: Enter<BR>Picture Mode: L<BR><BR><BR><a href=\"javascript:window.open('input.html','Click to Send Text Imput!','width=600,height=400')\">Open Text Input</a><BR><BR>Not Working? Issue a new Token using: r";
function addEvent(element, eventName, callback) {
@ -54,13 +55,18 @@
}
}
function showPop() {
var popup = document.getElementById("myPopup");
popup.classList.toggle("show");
}
addEvent(document, "keypress", function (e) {
console.log(e)
e = e || window.event;
// Handle
if (e.key == "w") {
fetch(rootURL + "/up")
fetch(rootURL + "/up")
.then(function (response) {
return response.json();
})
@ -163,7 +169,7 @@
})
}
if (e.key == "p") {
if (e.key == "l") {
fetch(rootURL + "/pmode")
.then(function (response) {
commandData