git ssb

2+

ev / mvd



Commit a91aacd99613bd8ba1f3551725dd523017b34d18

clean up unused functions

Ev Bogue committed on 6/25/2018, 7:05:13 PM
Parent: 3501e60932b1802ea5dbccb4e7a6aa81021cd254

Files changed

tools.jschanged
tools.jsView
@@ -46,28 +46,8 @@
4646 }
4747 })
4848 )
4949 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-*/
7050 }
7151
7252 module.exports.getFollowers = function (src) {
7353 var followerCount = 0
@@ -103,31 +83,8 @@
10383 })
10484 )
10585
10686 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*/
13087 }
13188
13289 module.exports.follow = function (src) {
13390 var button = h('span.button')
@@ -415,35 +372,8 @@
415372 }
416373 return link
417374 }
418375
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-
446376 module.exports.rawJSON = function (obj) {
447377 return JSON.stringify(obj, null, 2)
448378 .split(/([%@&][a-zA-Z0-9\/\+]{43}=*\.[\w]+)/)
449379 .map(function (e) {

Built with git-ssb-web