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 += '';