Commit a91aacd99613bd8ba1f3551725dd523017b34d18
clean up unused functions
Ev Bogue committed on 6/25/2018, 7:05:13 PMParent: 3501e60932b1802ea5dbccb4e7a6aa81021cd254
Files changed
tools.js | changed |
tools.js | |||
---|---|---|---|
@@ -46,28 +46,8 @@ | |||
46 | 46 … | } | |
47 | 47 … | }) | |
48 | 48 … | ) | |
49 | 49 … | return following | |
50 | -/* var count = 0 | ||
51 | - | ||
52 | - var following = h('div.following') | ||
53 | - | ||
54 | - following.appendChild(h('span', 'Following: ' + count)) | ||
55 | - following.appendChild(h('br')) | ||
56 | - | ||
57 | - sbot.friends.get({source: src}, function (err, follows) { | ||
58 | - for (var i in follows) { | ||
59 | - if (follows.hasOwnProperty(i)) { | ||
60 | - if (follows[i] == true) | ||
61 | - following.appendChild(h('a', {title: avatar.name(i).textContent, href: '#' + i}, h('span.avatar--small', avatar.image(i)))) | ||
62 | - count++ | ||
63 | - following.firstChild.textContent = 'Following: ' + count | ||
64 | - } | ||
65 | - } | ||
66 | - }) | ||
67 | - | ||
68 | - return following | ||
69 | -*/ | ||
70 | 50 … | } | |
71 | 51 … | ||
72 | 52 … | module.exports.getFollowers = function (src) { | |
73 | 53 … | var followerCount = 0 | |
@@ -103,31 +83,8 @@ | |||
103 | 83 … | }) | |
104 | 84 … | ) | |
105 | 85 … | ||
106 | 86 … | return followers | |
107 | - | ||
108 | - | ||
109 | - /*var count = 0 | ||
110 | - | ||
111 | - var followers = h('div.followers') | ||
112 | - | ||
113 | - followers.appendChild(h('span', 'Followers: ' + count)) | ||
114 | - followers.appendChild(h('br')) | ||
115 | - | ||
116 | - sbot.friends.get({dest: src}, function (err, follows) { | ||
117 | - for (var i in follows) { | ||
118 | - if (follows.hasOwnProperty(i)) { | ||
119 | - if (follows[i] == true) { | ||
120 | - followers.appendChild(h('a', {title: avatar.name(i).textContent, href: '#' + i}, h('span.avatar--small', avatar.image(i)))) | ||
121 | - count++ | ||
122 | - followers.firstChild.textContent = 'Followers: ' + count | ||
123 | - } | ||
124 | - } | ||
125 | - } | ||
126 | - }) | ||
127 | - | ||
128 | - | ||
129 | - return followers*/ | ||
130 | 87 … | } | |
131 | 88 … | ||
132 | 89 … | module.exports.follow = function (src) { | |
133 | 90 … | var button = h('span.button') | |
@@ -415,35 +372,8 @@ | |||
415 | 372 … | } | |
416 | 373 … | return link | |
417 | 374 … | } | |
418 | 375 … | ||
419 | - | ||
420 | -/*module.exports.messageLink = function (msglink) { | ||
421 | - var link = h('span', h('a', {href: '#' + msglink}, msglink.substring(0, 44) + '...')) | ||
422 | - | ||
423 | - if (ref.isMsg(msglink)) { | ||
424 | - pull( | ||
425 | - sbot.get(msglink, function (err, data) { | ||
426 | - console.log(data) | ||
427 | - if(err && err.name == 'NotFoundError') { | ||
428 | - var newlink = h('span', h('a', {href: '#' + msglink}, msglink.substring(0, 35) + ' (Missing)...')) | ||
429 | - } | ||
430 | - if(data.content.type === 'post' && 'string' === typeof data.content.text) { | ||
431 | - var newlink = h('span', h('a', {href: '#' + msglink}, data.content.text.substring(0, 44) + '...')) | ||
432 | - } | ||
433 | - else { | ||
434 | - var newlink = h('span', h('a', {href: '#' + msglink}, msglink.substring(0, 44) + '...')) | ||
435 | - } | ||
436 | - if (link) { | ||
437 | - link.parentNode.replaceChild(newlink, link) | ||
438 | - } | ||
439 | - }) | ||
440 | - ) | ||
441 | - } | ||
442 | - | ||
443 | - return link | ||
444 | -}*/ | ||
445 | - | ||
446 | 376 … | module.exports.rawJSON = function (obj) { | |
447 | 377 … | return JSON.stringify(obj, null, 2) | |
448 | 378 … | .split(/([%@&][a-zA-Z0-9\/\+]{43}=*\.[\w]+)/) | |
449 | 379 … | .map(function (e) { |
Built with git-ssb-web