aboutsummaryrefslogtreecommitdiff
path: root/webAO/client.js
diff options
context:
space:
mode:
authorsD <stoned@derpymail.org>2019-12-28 17:23:49 +0100
committersD <stoned@derpymail.org>2019-12-28 17:23:49 +0100
commit790b7ee755db01559fb45e930046fb1ce2c930ab (patch)
treee7fa18eeb3d9f8c30359a7e515c9c2b6c03719d8 /webAO/client.js
parent11bec733825bbfab18f0159b918a8dcb27db3d5c (diff)
make the id stick better
Diffstat (limited to 'webAO/client.js')
-rw-r--r--webAO/client.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/webAO/client.js b/webAO/client.js
index 59cdf1d..5c211c3 100644
--- a/webAO/client.js
+++ b/webAO/client.js
@@ -51,9 +51,16 @@ const fp = new Fingerprint({
screen_resolution: true
});
-// An emulated, semi-unique HDID that is generally safe for HDID bans.
-const hdid = fp.get();
-console.info(`Your emulated HDID is ${hdid}`);
+/** An emulated, semi-unique HDID that is generally safe for HDID bans. */
+const cookieid = getCookie("fingerprint");
+let hdid;
+if (cookieid) {
+ hdid = cookieid;
+} else {
+ hdid = fp.get();
+ setCookie("fingerprint",hdid);
+}
+console.log(`Your emulated HDID is ${hdid}`);
let lastICMessageTime = new Date(0);