automatic logging in
This commit is contained in:
parent
172b8c3051
commit
60e579c349
1 changed files with 6 additions and 1 deletions
|
@ -247,7 +247,12 @@ class Game extends GameBasic {
|
|||
if (this.entities.length == 0) this.entities = [this.player];
|
||||
}
|
||||
async init() {
|
||||
let tok = new URL(window.location).searchParams.get('token');
|
||||
let u = new URL(window.location);
|
||||
let tok = u.searchParams.get('token');
|
||||
if (!tok) tok = window.localStorage.getItem('tok');
|
||||
window.localStorage.setItem('tok',tok);
|
||||
window.history.replaceState(null, '', window.location.pathname);
|
||||
|
||||
super.init();
|
||||
|
||||
let that = this;
|
||||
|
|
Loading…
Reference in a new issue