aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client.js21
1 files changed, 3 insertions, 18 deletions
diff --git a/client.js b/client.js
index 4fe2cad..e67fa23 100644
--- a/client.js
+++ b/client.js
@@ -69,21 +69,6 @@ if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phon
var carea = 0;
var linifile;
var pinifile;
-var hdid;
-
-hashCode = function(str) {
- var hash = 0, i, chr, len;
- if (str.length === 0) return hash;
- for (i = 0, len = str.length; i < len; i++) {
- chr = str.charCodeAt(i);
- hash = ((hash << 5) - hash) + chr;
- hash |= 0; // Convert to 32bit integer
- }
- return hash;
- };
-
-hdid = hashCode(navigator.userAgent);
-
serv.onopen = function(evt) {
onOpen(evt)
};
@@ -350,7 +335,7 @@ function updateText() {
function onOpen(e) {
if (mode == "join") {
- serv.send("HI#" + hdid + "#%");
+ serv.send("HI#" + navigator.userAgent + "#%");
serv.send("ID#webAO#2.4.5#%");
} else {
document.getElementById("client_loading").style.display = "none";
@@ -365,13 +350,13 @@ function onClose(e) {
function ReconnectButton() {
serv = new WebSocket("ws://" + serverIP);
if (serv) {
- serv.send("HI#" + hdid + "#%");
+ serv.send("HI#" + navigator.userAgent + "#%");
document.getElementById("client_error").style.display = "none";
}
}
function RetryButton() {
-serv.send("HI#" + hdid + "#%");
+serv.send("HI#" + navigator.userAgent + "#%");
}
function onError(e) {