aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEv Bogue <ev@evbogue.com>2019-04-06 13:45:00 -0500
committerEv Bogue <ev@evbogue.com>2019-04-06 13:45:00 -0500
commita91dc93c6b8074abc85744716effd8eb1851c2e2 (patch)
tree2cb6c3a5a79c26fe10f3526e775c87ba0196da4b
parentd1350773720b709e549927a2bf23548aab8df14a (diff)
clean up the keygen process, and make sure we link to local websockets in repo
-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