mirror of
https://github.com/iamrbn/Reddit-Widget.git
synced 2026-08-24 10:04:26 -05:00
Update Reddit-Widget.js
This commit is contained in:
+5
-1
@@ -86,7 +86,7 @@ if (minutesDiff() < 525600) { //525600min = one year
|
||||
since = Math.abs(minutesDiff()/60/24).toFixed(0)
|
||||
time = " d"
|
||||
} else {
|
||||
since = Math.abs(minutesDiff()/60/24/7/4/12).toFixed(1)
|
||||
since = Math.abs(minutesDiff()/60/24/365).toFixed(1)
|
||||
time = " y"
|
||||
}
|
||||
|
||||
@@ -102,6 +102,10 @@ arr.forEach((item, index) => {
|
||||
}
|
||||
});
|
||||
|
||||
arr.forEach((item, index) => {
|
||||
arr[index] = Intl.NumberFormat('locale', {notation:'compact', maximumSignificantDigits: 4}).format(item)
|
||||
})
|
||||
|
||||
// DECLARE VARIABLES
|
||||
var totalKarma = arr[0];
|
||||
var postKarma = arr[1];
|
||||
|
||||
Reference in New Issue
Block a user