diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-04-26 19:23:15 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-04-26 19:23:15 +0200 |
| commit | 5f145fb65802844aa22563b67361b939f01d72fe (patch) | |
| tree | 2a22a2b541fea8a21b109a1ef01c59b895cde7e1 | |
| parent | b0ada80bc3a7882ac50c16188004e34061af5845 (diff) | |
silently identify anonymous users
| -rw-r--r-- | js/user.js | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -12,7 +12,13 @@ var user = (function(){ } user.load = function(){ user.username = user.getCookie() - el.value = user.username + if (! user.username) { + user.username = 'rando' + randint(9876876) + user.setCookie(user.username) + } + if (!user.username.match(/^rando/)) { + el.value = user.username + } } user.prefs = new function(){} user.prefs.get = function (key){ |
