git ssb

0+

ev / minbase



Tree: f1cc08ac986f18880000b780dae6fb2043e76948

Files: f1cc08ac986f18880000b780dae6fb2043e76948 / config.js

590 bytesRaw
1var http = require('http')
2
3module.exports = function () {
4 var host = window.location.origin
5
6 if (localStorage[host])
7 var config = JSON.parse(localStorage[host])
8 else
9 http.get(host + '/get-config', function (res) {
10 res.on('data', function (data, remote) {
11 var config = data
12 localStorage[host] = config
13 location.reload()
14 })
15 })
16
17
18 config.blobsUrl = host + '/blobs/get/'
19 config.emojiUrl = host + '/img/emoji/'
20
21 if (config.ws.remote)
22 config.remote = config.ws.remote
23 else
24 config.remote = config.address
25
26 return config
27}
28
29
30

Built with git-ssb-web