add portal age, in days/hours/etc to tooltip along with existing capture timestamp in portal info panel

This commit is contained in:
Jon Atkins
2013-11-10 21:39:57 +00:00
parent fddf28bc51
commit df3a8adcb2
2 changed files with 13 additions and 8 deletions

View File

@ -31,7 +31,8 @@ window.renderPortalDetails = function(guid) {
var playerText = player ? ['owner', player] : null;
var time = d.captured
? '<span title="' + unixTimeToDateTimeString(d.captured.capturedTime, false) + '">'
? '<span title="' + unixTimeToDateTimeString(d.captured.capturedTime, false) + '\n'
+ formatInterval(Math.floor((Date.now()-d.captured.capturedTime)/1000), 2) + ' ago">'
+ unixTimeToString(d.captured.capturedTime) + '</span>'
: null;
var sinceText = time ? ['since', time] : null;