Commit d6962d0cf16699d6ee6c70fcbb8596d994c3868b
add settings to enable MVP toggling of things I don't want
mix irving committed on 9/19/2016, 8:05:14 AMParent: 33eacb10147b21fe1eddcd4eddd5ee575141d780
Files changed
modules/like.js | changed |
settings.js | added |
modules/like.js | ||
---|---|---|
@@ -1,22 +1,25 @@ | ||
1 | 1 … | |
2 | 2 … | var h = require('hyperscript') |
3 | 3 … | var u = require('../util') |
4 | 4 … | var pull = require('pull-stream') |
5 … | +var settings = require('../settings').like | |
5 | 6 … | |
6 | 7 … | var plugs = require('../plugs') |
7 | 8 … | |
8 | 9 … | var message_confirm = plugs.first(exports.message_confirm = []) |
9 | 10 … | var message_link = plugs.first(exports.message_link = []) |
10 | 11 … | var sbot_links = plugs.first(exports.sbot_links = []) |
11 | 12 … | |
12 | 13 … | exports.message_content = function (msg, sbot) { |
13 | - if(msg.value.content.type !== 'vote') return | |
14 … | + if (settings.message_content === false) return | |
15 … | + if (msg.value.content.type !== 'vote') return | |
16 … | + | |
14 | 17 … | var link = msg.value.content.vote.link |
15 | 18 … | return h('div', |
16 | - msg.value.content.vote.value > 0 ? 'Dug' : 'Undug', | |
17 | - ' ', message_link(link) | |
18 | - ) | |
19 … | + msg.value.content.vote.value > 0 ? 'Dug' : 'Undug', | |
20 … | + ' ', message_link(link) | |
21 … | + ) | |
19 | 22 … | } |
20 | 23 … | |
21 | 24 … | exports.message_meta = function (msg, sbot) { |
22 | 25 … | var digs = h('a') |
Built with git-ssb-web