Files: 12a75517dfb361b5f8a4df0c91372c0c68f1f164 / index.js
496 bytesRaw
1 | var h = require('hyperscript') |
2 | |
3 | var views = require('./views') |
4 | |
5 | var ref = require('ssb-ref') |
6 | |
7 | document.head.appendChild(h('style', require('./style.css.json'))) |
8 | |
9 | var src = window.location.hash.substring(1) |
10 | |
11 | window.onhashchange = function () { |
12 | window.location.reload() |
13 | } |
14 | |
15 | if (src == 'raw') { |
16 | views.rawstream() |
17 | } else if (ref.isFeed(src)) { |
18 | views.userstream(src) |
19 | } else if (ref.isMsg(src)) { |
20 | views.get(src) |
21 | } else if (src == 'compose') { |
22 | views.compose() |
23 | } else { |
24 | views.logstream() |
25 | } |
26 |
Built with git-ssb-web