git ssb

0+

ev / microbay



forked from Dominic / patchbay

Tree: ae5dc8ad4e093e668b8fcff19e4434330f5d9d24

Files: ae5dc8ad4e093e668b8fcff19e4434330f5d9d24 / modules / app.js

460 bytesRaw
1var plugs = require('../plugs')
2var h = require('hyperscript')
3
4var screen_view = plugs.first(exports.screen_view = [])
5
6exports.app = function () {
7 function hash() {
8 return window.location.hash.substring(1)
9 }
10
11 var view = screen_view(hash() || 'tabs')
12
13 var screen = h('div.screen.column', view)
14
15 window.onhashchange = function (ev) {
16 var _view = view
17 screen.replaceChild(view = screen_view(hash()), _view)
18 }
19
20 return screen
21
22}
23
24
25
26
27
28
29
30
31

Built with git-ssb-web