use "#" url instead of "javascript:"

This commit is contained in:
creeper123123321 2020-12-23 17:40:57 -03:00 committed by GitHub
parent ecbe0a604d
commit b00a3ad140
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,7 +84,7 @@ $(() => {
let remove = document.createElement("a"); let remove = document.createElement("a");
n.innerText = " " + name + " "; n.innerText = " " + name + " ";
remove.innerText = "Remove"; remove.innerText = "Remove";
remove.href = "javascript:"; remove.href = "#";
remove.onclick = () => { remove.onclick = () => {
logout(id); logout(id);
}; };
@ -173,7 +173,7 @@ $(() => {
let add = document.createElement("a"); let add = document.createElement("a");
p.appendChild(add); p.appendChild(add);
add.innerText = "Listen to " + username; add.innerText = "Listen to " + username;
add.href = "javascript:"; add.href = "#";
add.onclick = () => { add.onclick = () => {
socket.send(JSON.stringify({ socket.send(JSON.stringify({
"action": "minecraft_id_login", "action": "minecraft_id_login",
@ -186,7 +186,7 @@ $(() => {
let link = document.createElement("a"); let link = document.createElement("a");
p.appendChild(link); p.appendChild(link);
link.innerText = "Listen to username in VIAaaS instance"; link.innerText = "Listen to username in VIAaaS instance";
link.href = "javascript:"; link.href = "#";
link.onclick = () => { link.onclick = () => {
let user = prompt("Username (Minecraft.ID is case-sensitive): ", ""); let user = prompt("Username (Minecraft.ID is case-sensitive): ", "");
let callbackUrl = new URL(location.origin + location.pathname + "#username=" + encodeURIComponent(user)); let callbackUrl = new URL(location.origin + location.pathname + "#username=" + encodeURIComponent(user));