diff options
| author | Ev Bogue <ev@evbogue.com> | 2019-04-06 13:45:00 -0500 | 
|---|---|---|
| committer | Ev Bogue <ev@evbogue.com> | 2019-04-06 13:45:00 -0500 | 
| commit | a91dc93c6b8074abc85744716effd8eb1851c2e2 (patch) | |
| tree | 2cb6c3a5a79c26fe10f3526e775c87ba0196da4b | |
| parent | d1350773720b709e549927a2bf23548aab8df14a (diff) | |
clean up the keygen process, and make sure we link to local websockets in repo
| -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 | 
