Fix suffixes.
This commit is contained in:
parent
5f467440f9
commit
5299cbf50b
@ -32,11 +32,14 @@ MarkNewIPs =
|
|||||||
MarkNewIPs.postIDs = postIDs
|
MarkNewIPs.postIDs = postIDs
|
||||||
|
|
||||||
markNew: (post, ipCount) ->
|
markNew: (post, ipCount) ->
|
||||||
suffix = switch ipCount
|
suffix = if (ipCount // 10) % 10 is 1
|
||||||
when 1 then 'st'
|
'th'
|
||||||
when 2 then 'nd'
|
else
|
||||||
when 3 then 'rd'
|
switch ipCount % 10
|
||||||
else 'th'
|
when 1 then 'st'
|
||||||
|
when 2 then 'nd'
|
||||||
|
when 3 then 'rd'
|
||||||
|
else 'th'
|
||||||
counter = $.el 'span',
|
counter = $.el 'span',
|
||||||
className: 'ip-counter'
|
className: 'ip-counter'
|
||||||
textContent: "(#{ipCount})"
|
textContent: "(#{ipCount})"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user