Fix suffixes.
This commit is contained in:
parent
6d2a3dfefb
commit
fb0a4c51f5
@ -13655,7 +13655,7 @@
|
||||
},
|
||||
markNew: function(post, ipCount) {
|
||||
var counter, suffix;
|
||||
suffix = ['st', 'nd', 'rd'][ipCount % 10] || 'th';
|
||||
suffix = (Math.floor(ipCount / 10)) % 10 === 1 ? 'th' : ['st', 'nd', 'rd'][ipCount % 10 - 1] || 'th';
|
||||
counter = $.el('span', {
|
||||
className: 'ip-counter',
|
||||
textContent: "(" + ipCount + ")"
|
||||
|
||||
@ -13678,7 +13678,7 @@
|
||||
},
|
||||
markNew: function(post, ipCount) {
|
||||
var counter, suffix;
|
||||
suffix = ['st', 'nd', 'rd'][ipCount % 10] || 'th';
|
||||
suffix = (Math.floor(ipCount / 10)) % 10 === 1 ? 'th' : ['st', 'nd', 'rd'][ipCount % 10 - 1] || 'th';
|
||||
counter = $.el('span', {
|
||||
className: 'ip-counter',
|
||||
textContent: "(" + ipCount + ")"
|
||||
|
||||
@ -32,7 +32,10 @@ MarkNewIPs =
|
||||
MarkNewIPs.postIDs = postIDs
|
||||
|
||||
markNew: (post, ipCount) ->
|
||||
suffix = ['st', 'nd', 'rd'][ipCount % 10] or 'th' # fuck switches
|
||||
suffix = if (ipCount // 10) % 10 is 1
|
||||
'th'
|
||||
else
|
||||
['st', 'nd', 'rd'][ipCount % 10 - 1] or 'th' # fuck switches
|
||||
counter = $.el 'span',
|
||||
className: 'ip-counter'
|
||||
textContent: "(#{ipCount})"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user