Commit eb7c7ddd2c8ba50f7e00003d9058d3b2d1e3779b
sort ids by most mentions
Dominic Tarr committed on 6/30/2016, 9:51:49 PMParent: ba2f9b6ae92ee437a269b2500d96bf22636b058f
Files changed
modules/search-box.js | changed |
modules/search-box.js | ||
---|---|---|
@@ -84,10 +84,13 @@ | ||
84 | 84 | suggestions['@'] = links.map(function (e) { |
85 | 85 | return { |
86 | 86 | title: e.name, |
87 | 87 | value: e.id, |
88 | - subtitle: e.id + ' (' + e.rank + ')' | |
88 | + subtitle: e.id + ' (' + e.rank + ')', | |
89 | + rank: e.rank | |
89 | 90 | } |
91 | + }).sort(function (a, b) { | |
92 | + return b.rank - a.rank | |
90 | 93 | }) |
91 | 94 | }) |
92 | 95 | ) |
93 | 96 |
Built with git-ssb-web