diff --git a/client/js/shout.js b/client/js/shout.js index 97508ed..5f32483 100644 --- a/client/js/shout.js +++ b/client/js/shout.js @@ -327,6 +327,7 @@ $(function() { self.addClass("active") .find(".badge") .removeClass("highlight") + .data("count", "") .empty(); if (sidebar.find(".highlight").length == 0) { @@ -432,8 +433,9 @@ $(function() { var badge = btn.find(".badge"); if (badge.length !== 0) { - var i = (parseInt(badge.html()) || 0) + 1; - badge.html(i); + var i = (badge.data("count") || 0) + 1; + badge.data("count", i); + badge.html(i > 999 ? (i / 1000).toFixed(1) + "k" : i); if (highlight || query) { badge.addClass("highlight"); } diff --git a/package.json b/package.json index 8b0c1e1..2f73355 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "shout", "description": "A web IRC client", - "version": "0.25.2", + "version": "0.25.3", "author": "Mattias Erming", "preferGlobal": true, "bin": {