Adding AutoScroll for youtube Shorts
This commit is contained in:
parent
a549671e70
commit
15c2a57ebe
@ -25,8 +25,31 @@
|
||||
</style>
|
||||
<script>
|
||||
let rootURL = "https://grwh.work:3031"
|
||||
|
||||
var timer;
|
||||
// Youtube Shorts Timer -
|
||||
function startTimer() {
|
||||
console.log("Shorts timer started!")
|
||||
alert("Auto Scroll Shorts Timer Started!");
|
||||
timer = setInterval(function () {
|
||||
console.log("60 seconds are up, going to next short");
|
||||
fetch(rootURL + "/down")
|
||||
.then(function (response) {
|
||||
return response.json();
|
||||
})
|
||||
.then(function (data) {
|
||||
if (data == 1) return console.log("Command: DOWN - SENT!")
|
||||
})
|
||||
}, 59000);
|
||||
}
|
||||
|
||||
function stopTimer() {
|
||||
alert("Auto Scroll Shorts Timer stopped");
|
||||
clearInterval(timer);
|
||||
}
|
||||
|
||||
let pass = prompt("Enter the password!", "");
|
||||
let text;
|
||||
let text;a
|
||||
fetch(rootURL + "/checkPass?pass=" + pass)
|
||||
.then(function (response) {
|
||||
return response.json();
|
||||
@ -36,7 +59,8 @@
|
||||
if (pass == null || pass == "") {
|
||||
document.getElementById("view").innerHTML = "WOO"
|
||||
} 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: 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";
|
||||
|
||||
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><button onclick=\"startTimer()\">Enable AutoScroll</button> / <button onclick=\"stopTimer()\"> Disable</button> <BR><BR>Commands Not Working? Issue a new Token using: r";
|
||||
|
||||
|
||||
function addEvent(element, eventName, callback) {
|
||||
@ -94,8 +118,8 @@
|
||||
})
|
||||
}
|
||||
|
||||
if (e.key == "Enter") {
|
||||
fetch(rootURL + "/enter" || e.code == "Numpad5")
|
||||
if (e.key == "Enter" || e.code == "Numpad5") {
|
||||
fetch(rootURL + "/enter")
|
||||
.then(function (response) {
|
||||
return response.json();
|
||||
})
|
||||
@ -165,7 +189,7 @@
|
||||
})
|
||||
}
|
||||
|
||||
if (e.key == "h" || e.code == "Numpad5") {
|
||||
if (e.key == "h") {
|
||||
fetch(rootURL + "/home")
|
||||
.then(function (response) {
|
||||
return response.json();
|
||||
@ -176,6 +200,9 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user