diff options
Diffstat (limited to 'ext/bg/js/translator.js')
-rw-r--r-- | ext/bg/js/translator.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/bg/js/translator.js b/ext/bg/js/translator.js index cc0336e7..ede89fc6 100644 --- a/ext/bg/js/translator.js +++ b/ext/bg/js/translator.js @@ -190,6 +190,18 @@ class Translator { group.push(dictTagSanitize(stat)); } + for (const category in stats) { + stats[category].sort((a, b) => { + if (a.notes < b.notes) { + return -1; + } else if (a.notes > b.notes) { + return 1; + } else { + return 0; + } + }); + } + return stats; } } |