git ssb

16+

Dominic / patchbay



Tree: 449d051990b8d8149dd2a3bb9078e269533e324e

Files: 449d051990b8d8149dd2a3bb9078e269533e324e / 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