Fix parseAllDates() that could break dates (in listing)
Fix parseAllDates() that would break torrent list dates if it had already been executed before
Cette révision appartient à :
Parent
d5c2c6b676
révision
c78492b43e
1 fichiers modifiés avec 4 ajouts et 2 suppressions
|
@ -59,8 +59,10 @@ function parseAllDates() {
|
|||
var list = document.getElementsByClassName("date-short")
|
||||
for(var i = 0; i < list.length; i++) {
|
||||
var e = list[i]
|
||||
e.innerText = new Date(e.title).toLocaleString(lang, ymdOpt)
|
||||
e.title = new Date(e.title).toLocaleString(lang)
|
||||
var newDate = new Date(e.title)
|
||||
if(newDate == "Invalid Date") continue
|
||||
e.innerText = newDate.toLocaleString(lang, ymdOpt)
|
||||
e.title = newDate.toLocaleString(lang)
|
||||
}
|
||||
|
||||
var list = document.getElementsByClassName("date-full")
|
||||
|
|
Référencer dans un nouveau ticket