git ssb

16+

Dominic / patchbay



Tree: 1a2e89c1945e9b2330e4834a9e544adbc12b171d

Files: 1a2e89c1945e9b2330e4834a9e544adbc12b171d / modules / meta-image.js

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

Built with git-ssb-web