git ssb

16+

Dominic / patchbay



Tree: f90124ba5ae5f6479370cba8fc7df6744422db23

Files: f90124ba5ae5f6479370cba8fc7df6744422db23 / modules_extra / meta-image.js

1127 bytesRaw
1var h = require('hyperscript');
2
3//render a message
4
5exports.needs = { blob_url: 'first' }
6exports.gives = 'message_content'
7
8exports.create = function (api) {
9 return function(msg, sbot) {
10 if (msg.value.content.type !== 'meta-image')
11 return;
12
13 var v = msg.value.content;
14 return h('div',
15 // h('h2', "(" + v.Track + ") " + v.Title),
16 h('img', { "src" : api.blob_url(v.link) }))
17
18 // h('dl',
19 // Object.keys(v).map(function(k) {
20 // return [
21 // h("dt", k),
22 // h("dd", v[k]),
23 // ]
24 // })))
25
26 // "Album": "the fall of",
27 // "Crc32": "038becab",
28 // "Creator": "bleupulp",
29 // "Format": "VBR MP3",
30 // "Height": "0",
31 // "Length": "375.23",
32 // "Md5": "2c517c8e813da5f940c8c7e77d4b7f3f",
33 // "Mtime": "1399498698",
34 // "Name": "2_bleupulp_-_clouds.mp3",
35 // "Sha1": "9f6a96a3d5571ed1ec2a7da38ffebdcd5f181482",
36 // "Size": "15009000",
37
38 // "Title": "clouds",
39 // "Track": "2",
40 // "Width": "0",
41
42 }
43}
44

Built with git-ssb-web