aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app.js2
-rw-r--r--lib.js6
2 files changed, 5 insertions, 3 deletions
diff --git a/app.js b/app.js
index 66816c5..1869dba 100644
--- a/app.js
+++ b/app.js
@@ -140,7 +140,7 @@ function route () {
document.getElementById("inp").addEventListener("change", readFile);
}
- var ws = new WebSocket('ws://bogbook.com/' + src)
+ var ws = new WebSocket('ws://localhost:8080/' + src)
var clientLog = {
publicKey: src
diff --git a/lib.js b/lib.js
index 572d2da..c386e5a 100644
--- a/lib.js
+++ b/lib.js
@@ -14,11 +14,13 @@ function getKeys () {
}
console.log(genkey)
- if ((keys.publicKey.includes('+')) || (keys.publicKey.includes('/'))) {
+
+ // for some reason keys with /'s in them mess up node, so we'll try generating keys again if they contain slashes
+ if (keys.publicKey.includes('/')) {
console.log('TRYING AGAIN')
setTimeout(function () {
window.location.reload()
- }, 100)
+ }, 10)
} else {
localStorage['id'] = JSON.stringify(keys)
return keys