From 4fa7d07500568859ab1b0c3d867c55ef6e12b49f Mon Sep 17 00:00:00 2001 From: Cutls Date: Mon, 29 Jul 2019 00:52:12 +0900 Subject: [PATCH] Improve: sorting --- app/js/post/suggest.js | 7 ++++++- app/js/tl/src.js | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/js/post/suggest.js b/app/js/post/suggest.js index 1ae2a968..1b5155a1 100644 --- a/app/js/post/suggest.js +++ b/app/js/post/suggest.js @@ -91,7 +91,7 @@ input.addEventListener("focus", function () { var his = tag.history; var uses = his[0].uses * 1 + his[1].uses * 1 + his[2].uses * 1 + his[3].uses * 1 + his[4].uses * 1 + his[5].uses * 1 + his[6].uses * 1; tagHTML = '
#' + - escapeHTML(tag.name) + ' ' + uses + 'toots' + escapeHTML(tag.name) + ' ' + uses + 'toot(s)' var item = { "uses": uses, "html": tagHTML @@ -108,8 +108,13 @@ input.addEventListener("focus", function () { return 0; }); var ins = "" + var nev = false Object.keys(tags).forEach(function (key7) { ins = ins + tags[key7].html + if (key7 <= 0 && !nev) { + ins = ins + '
' + nev = true + } }); $("#suggest").html(ins); $("#right-side").show() diff --git a/app/js/tl/src.js b/app/js/tl/src.js index 76789730..15de7122 100644 --- a/app/js/tl/src.js +++ b/app/js/tl/src.js @@ -177,12 +177,12 @@ function graphDraw(tag, acct_id) { var zero = 50 - (his[0].uses / max * 50); if (max === 0) { tags = '

' + - '' + his[0].uses + 'toots ' + his[0].uses + 'toot(s) #' + escapeHTML(tag.name) + ' ' + his[0].accounts + lang.lang_src_people; } else { tags = '

' + '' + - '' + his[0].uses + 'toots ' + his[0].uses + 'toot #' + escapeHTML(tag.name) + ' ' + his[0].accounts + lang.lang_src_people; }