From 24e11b483aa22fa67c0f98b002bc3309bec35a1e Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Sun, 1 Dec 2013 02:11:52 +0000 Subject: [PATCH] plugin: portal-counts fixed also reformatted the table a little - moved totals into the columns below the L8 to L1 lists, then neutral after that --- plugins/portal-counts.user.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/portal-counts.user.js b/plugins/portal-counts.user.js index b511d6e8..07f92162 100644 --- a/plugins/portal-counts.user.js +++ b/plugins/portal-counts.user.js @@ -2,7 +2,7 @@ // @id iitc-plugin-portals-count@yenky // @name IITC plugin: Show total counts of portals // @category Info -// @version 0.0.8.@@DATETIMEVERSION@@ +// @version 0.0.9.@@DATETIMEVERSION@@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ @@ -50,9 +50,8 @@ window.plugin.portalcounts.getPortals = function(){ $.each(window.portals, function(i, portal) { retval=true; - var d = portal.options.details; + var level = portal.options.level; var team = portal.options.team; - var level = Math.floor(getPortalLevel(d)); // just count portals in viewport if(!displayBounds.contains(portal.getLatLng())) return true; switch (team){ @@ -84,15 +83,16 @@ window.plugin.portalcounts.getPortals = function(){ counts += ''+window.plugin.portalcounts.PortalsEnl[level]+''+window.plugin.portalcounts.PortalsRes[level]+''; counts += ''; } - counts += ' '; + + counts += 'Total:'+window.plugin.portalcounts.enlP+''+window.plugin.portalcounts.resP+''; + counts += 'Neutral:'; if(minlvl > 0) - counts += 'zoom in to see unclaimed'; + counts += 'zoom in to see unclaimed portals'; else counts += window.plugin.portalcounts.neuP; - counts += ' Portal(s)'; - counts += 'Enlightened:'+window.plugin.portalcounts.enlP+' Portal(s)'; - counts += 'Resistance:'+window.plugin.portalcounts.resP+' Portal(s)'; + counts += ''; + } else counts += 'No Portals in range!'; counts += '';