diff options
-rw-r--r-- | app.js | 2 | ||||
-rw-r--r-- | lib.js | 6 |
2 files changed, 5 insertions, 3 deletions
@@ -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 @@ -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 |