Skip to content

Commit 9d2e323

Browse files
authored
Simplify install percentage display logic
1 parent 697d540 commit 9d2e323

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

js/index.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -507,11 +507,9 @@ function getAppHTML(app, appInstalled, forInterface) {
507507
infoTxt.push(`Last update: ${(info.modified.toLocaleDateString())}`);
508508
if (info.installs){
509509
let percent=(info.installs / appCounts.installs * 100).toFixed(0);
510-
if(percent!=0){
511-
infoTxt.push(`${info.installs} reported installs (${percent}% of all users)`);
512-
}else{
513-
infoTxt.push(`${info.installs} reported installs`);
514-
}
510+
let percentText=percent<1?"Less than 1% of all users":percent+"% of all users";
511+
infoTxt.push(`${info.installs} reported installs (${percentText})`);
512+
515513
}
516514
if (info.favourites) {
517515
let percent=(info.favourites / info.installs * 100).toFixed(0);

0 commit comments

Comments
 (0)