git ssb

16+

Dominic / patchbay



Tree: e33a98abcc85d3a3b35c0b2db5b98200b0614954

Files: e33a98abcc85d3a3b35c0b2db5b98200b0614954 / modules_extra / blob.js

479 bytesRaw
1var h = require('hyperscript')
2var ref = require('ssb-ref')
3
4exports.gives = 'screen_view'
5
6exports.needs = {
7 blob_url: 'first'
8}
9
10exports.create = function (api) {
11 return function (path) {
12 if(ref.isBlob(path)) return blob_view(path)
13 }
14
15 function blob_view(id) {
16 return h('iframe', {
17 src: api.blob_url(id),
18 sandbox: '',
19 style: {
20 position: 'absolute',
21 width: '100%',
22 height: '100%',
23 border: 0,
24 }
25 })
26 }
27}
28

Built with git-ssb-web