git ssb

0+

ev / microbay



forked from Dominic / patchbay

Tree: 9a90757d9b3b08602cfc1aaf8d1b507d15a23d94

Files: 9a90757d9b3b08602cfc1aaf8d1b507d15a23d94 / 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