Adding button to renew token
This commit is contained in:
parent
780b7f0291
commit
1a9b8532d5
@ -84,6 +84,22 @@
|
|||||||
showSuccessAlert("You have logged in successfully!")
|
showSuccessAlert("You have logged in successfully!")
|
||||||
|
|
||||||
|
|
||||||
|
function generateNewToken() {
|
||||||
|
fetch(rootURL + "/newToken")
|
||||||
|
.then(function (response) {
|
||||||
|
return response.json();
|
||||||
|
})
|
||||||
|
.then(function (data) {
|
||||||
|
if (data == 1) {
|
||||||
|
showSuccessAlert("New Token Request Sent Successfully!")
|
||||||
|
return console.log("Command: New Token Request - SENT!")
|
||||||
|
} else {
|
||||||
|
showSuccessAlert("New Token Request FAILED!")
|
||||||
|
return console.log("Command: New Token Request FAILED!")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
let pass = prompt("Enter the password!", "");
|
let pass = prompt("Enter the password!", "");
|
||||||
let text;
|
let text;
|
||||||
|
|
||||||
@ -98,7 +114,7 @@
|
|||||||
document.getElementById("view").innerHTML = "WOO"
|
document.getElementById("view").innerHTML = "WOO"
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
document.getElementById("view").innerHTML = "<CENTER><IMG SRC=\"../images/icon.png\"></CENTER><a href=\"javascript:window.open('help.html','Click for Key ShortCuts!','width=600,height=400')\">Click for Key ShortCuts!</a><BR><BR><a href=\"javascript:window.open('input.html','Click to Send Text Imput!','width=600,height=400')\"><button type=\"button\" class=\"btn btn-primary\">Open Text Input</button></a><BR><BR><button type=\"button\" class=\"btn btn-primary\" onclick=\"startTimer()\">Enable AutoScroll</button> / <button type=\"button\" class=\"btn btn-primary\" onclick=\"stopTimer()\"> Disable</button> <BR><BR>Commands Not Working? Issue a new Token using: R";
|
document.getElementById("view").innerHTML = "<CENTER><IMG SRC=\"../images/icon.png\"></CENTER><a href=\"javascript:window.open('help.html','Click for Key ShortCuts!','width=600,height=400')\">Click for Key ShortCuts!</a><BR><BR><a href=\"javascript:window.open('input.html','Click to Send Text Imput!','width=600,height=400')\"><button type=\"button\" class=\"btn btn-primary\">Open Text Input</button></a><BR><BR><button type=\"button\" class=\"btn btn-primary\" onclick=\"startTimer()\">Enable AutoScroll</button> / <button type=\"button\" class=\"btn btn-primary\" onclick=\"stopTimer()\"> Disable</button> <BR><BR>Commands Not Working? Issue a new Token using: <BR> <button type=\"button\" class=\"btn btn-primary\" onclick=\"generateNewToken()\">Request new Token</button>";
|
||||||
|
|
||||||
|
|
||||||
function addEvent(element, eventName, callback) {
|
function addEvent(element, eventName, callback) {
|
||||||
|
Loading…
Reference in New Issue
Block a user