git ssb

9+

cel / ssb-viewer



Commit 54c06b511566bde688d64e44d057778d19a45258

Give more weight to feed author's own About choices

cel committed on 5/15/2017, 11:15:35 PM
Parent: 6b33c9e3b67e99cb19a558a3a9ba0add813c4442

Files changed

lib/about.jschanged
lib/about.jsView
@@ -30,12 +30,15 @@
3030 // Use whatever properties have the most counts.
3131 // Usually we would want to handle renames for dead feeds and such,
3232 // but for ssb-viewer it is mostly public/archival content anyway,
3333 // so we'll let the popular name stand.
34 + // Except: prefer the feed's own choices slightly
3435 var propValueCounts = {/* prop: {value: count} */}
3536 var topValues = {/* prop: value */}
3637 var topValueCounts = {/* prop: count */}
3738 var about = {}
39 + // bias the feed's own choice by 1
40 + aboutByFeed._author = aboutByFeed[id] || {}
3841 for (var feed in aboutByFeed) {
3942 var feedAbout = aboutByFeed[feed]
4043 for (var prop in feedAbout) {
4144 var value = feedAbout[prop]

Built with git-ssb-web