Commit 903fcd29d3f44795fe947a4f12ab38ea616adb6c
connect to remote ws api, if possible
Dominic Tarr committed on 7/10/2016, 3:51:57 AMParent: a63b8f8aceec2f9582efb7ddd51e11e58515dd66
Files changed
sbot-api.js | changed |
sbot-api.js | ||
---|---|---|
@@ -30,9 +30,16 @@ | ||
30 | 30 | var opts = createConfig() |
31 | 31 | var sbot = null |
32 | 32 | |
33 | 33 | var rec = Reconnect(function (isConn) { |
34 | - createClient(function (err, _sbot) { | |
34 | + var remote | |
35 | + if('undefined' !== typeof localStorage) | |
36 | + remote = localStorage.remote | |
37 | + | |
38 | + createClient(keys, { | |
39 | + manifest: require('./manifest.json'), | |
40 | + remote: remote | |
41 | + }, function (err, _sbot) { | |
35 | 42 | if(err) { |
36 | 43 | console.error(err.stack) |
37 | 44 | isConn(err) |
38 | 45 | return |
@@ -92,4 +99,5 @@ | ||
92 | 99 | }) |
93 | 100 | } |
94 | 101 | } |
95 | 102 | |
103 | + |
Built with git-ssb-web