From 38392a80d5b0e056f588e8a0100adff19f312ea4 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Wed, 17 Jul 2013 18:09:16 +0100 Subject: [PATCH] portals list bugfix from pull request - ensure uncaptured portals have an age of 0 so they sort correctly - add missing quotes to style/title for portal age --- plugins/portals-list.user.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/portals-list.user.js b/plugins/portals-list.user.js index 39129630..fc8bdd2a 100644 --- a/plugins/portals-list.user.js +++ b/plugins/portals-list.user.js @@ -71,7 +71,8 @@ window.plugin.portalslist.getPortals = function() { var team = portal.options.team; var now = new Date(); var now_ms = now.getTime();// + (now.getTimezoneOffset() * 60000); - var age_string_long = 'This portal has never been captured.'; + var age_in_seconds = 0; + var age_string_long = 'This portal is not captured.'; var age_string_short = 'n/a'; if(portal.options.details.hasOwnProperty('captured') && portal.options.details.captured.hasOwnProperty('capturedTime')) { var age_in_seconds = Math.floor((now_ms - portal.options.details.captured.capturedTime)/1000); @@ -329,7 +330,7 @@ window.plugin.portalslist.portalTable = function(sortBy, sortOrder, filter) { + '' + portal.mods[3][2] + '' + '' + portal.APgain + '' + '' + portal.EAP + '' - + '' + portal.age_string_short + ''; + + '' + portal.age_string_short + ''; html+= ''; }