Skip to content

Commit

Permalink
remove user from localStorage
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaspark committed Nov 6, 2024
1 parent e05c338 commit 89e649c
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions js/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ var game = {
level: parseInt(localStorage.level, 10) || 0,
answers: (localStorage.answers && JSON.parse(localStorage.answers)) || {},
solved: (localStorage.solved && JSON.parse(localStorage.solved)) || [],
user: localStorage.user || '',
changed: false,
clickedCode: null,

Expand All @@ -25,11 +24,6 @@ var game = {
$('#language').val(game.language);
$('input[value="' + game.colorblind + '"]', '#colorblind').prop('checked', true);

if (!localStorage.user) {
game.user = '' + (new Date()).getTime() + Math.random().toString(36).slice(1);
localStorage.setItem('user', game.user);
}

this.setHandlers();
this.loadMenu();
game.loadLevel(levels[game.level]);
Expand Down

0 comments on commit 89e649c

Please sign in to comment.