Skip to content
Snippets Groups Projects
Commit 9e5f4800 authored by Kevin Lee's avatar Kevin Lee
Browse files

add back in name from query string. If you set a name from qs, it will not...

add back in name from query string. If you set a name from qs, it will not show prompt (prompts are broken on mobile)
parent 4850f025
No related branches found
No related tags found
No related merge requests found
......@@ -78,12 +78,17 @@ window.App = {
let username;
const jwt = getCookie("jwt");
if (jwt) {
if (jwt) { //grab name from jwt
const data = parseJwt(jwt);
username = data.typ.name;
}
username = promptForName(username); // promptForName is blocking
if (qs.name) {
username = qs.name; //always override with name from querystring if available
}
else {
username = promptForName(username); // promptForName is blocking
}
const myNametag = document.querySelector("#player-rig .nametag");
myNametag.setAttribute("text", "value", username);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment