mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 03:52:14 +00:00
Add filter to round gold > 999 to nearest thousand
This commit is contained in:
parent
834828ce74
commit
c80f7671db
1 changed files with 5 additions and 0 deletions
|
|
@ -13,4 +13,9 @@ angular.module('habitrpg')
|
|||
return function(html){
|
||||
return $('<div/>').html(html).text();
|
||||
}
|
||||
})
|
||||
.filter('goldRoundThousandsToK', function(){
|
||||
return function (gp) {
|
||||
return (gp > 999) ? (Math.floor(gp / 100) / 10.0 + 'K') : gp;
|
||||
}
|
||||
})
|
||||
Loading…
Reference in a new issue