Commit 66f1a12dfe0245c72e4092b63782428b6eceabbf
Show the names of digs on hover
Anders Rune Jensen committed on 12/16/2016, 10:14:22 AMParent: 5d532aa9c486a50cd8f14bc6ed99c16741f71391
Files changed
modules_basic/like.js | changed |
modules_basic/like.js | |||
---|---|---|---|
@@ -9,8 +9,9 @@ | |||
9 | 9 … | //var message_link = plugs.first(exports.message_link = []) | |
10 | 10 … | //var sbot_links = plugs.first(exports.sbot_links = []) | |
11 | 11 … | ||
12 | 12 … | exports.needs = { | |
13 … | + avatar_name: 'first', | ||
13 | 14 … | message_confirm: 'first', | |
14 | 15 … | message_link: 'first', | |
15 | 16 … | sbot_links: 'first' | |
16 | 17 … | } | |
@@ -48,11 +49,20 @@ | |||
48 | 49 … | } | |
49 | 50 … | ||
50 | 51 … | if(votes.length === 1) | |
51 | 52 … | digs.textContent = ' 1 Dig' | |
52 | - if(votes.length > 1) | ||
53 … | + else if(votes.length > 1) | ||
53 | 54 … | digs.textContent = ' ' + votes.length + ' Digs' | |
54 | 55 … | ||
56 … | + pull( | ||
57 … | + pull.values(votes.map(vote => { | ||
58 … | + return api.avatar_name(vote.source) | ||
59 … | + })), | ||
60 … | + pull.collect(function (err, ary) { | ||
61 … | + digs.title = ary.map(x => x.innerHTML).join(" ") | ||
62 … | + }) | ||
63 … | + ) | ||
64 … | + | ||
55 | 65 … | return digs | |
56 | 66 … | } | |
57 | 67 … | ||
58 | 68 … | exports.message_action = function (msg, sbot) { |
Built with git-ssb-web