diff --git a/plugins/portal-counts.user.js b/plugins/portal-counts.user.js index 8d59f214..fc43c048 100644 --- a/plugins/portal-counts.user.js +++ b/plugins/portal-counts.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @id iitc-plugin-portals-count@yenky // @name IITC plugin: Show total counts of portals -// @version 0.0.3.20130325.155511 +// @version 0.0.3.@@DATETIMEVERSION@@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ @@ -57,6 +57,8 @@ window.plugin.portalcounts.getPortals = function(){ window.plugin.portalcounts.PortalsRes[7] = 0; window.plugin.portalcounts.PortalsRes[8] = 0; //get portals informations from IITC + var minlvl = getMinPortalLevel(); + $.each(window.portals, function(i, portal) { retval=true; @@ -82,15 +84,30 @@ window.plugin.portalcounts.getPortals = function(){ if(retval) { counts += 'Enlightment: '+window.plugin.portalcounts.enlP+' Portal(s)'; for (level in window.plugin.portalcounts.PortalsEnl) { - counts += 'Level '+level+''+window.plugin.portalcounts.PortalsEnl[level]+''; + counts += 'Level '+level+''; + if(minlvl > level) + counts += 'zoom in'; + else + counts += window.plugin.portalcounts.PortalsEnl[level]; + counts += ''; } counts += ' '; counts += 'Resistance: '+window.plugin.portalcounts.resP+' Portal(s)'; for (level in window.plugin.portalcounts.PortalsRes) { - counts += 'Level '+level+''+window.plugin.portalcounts.PortalsRes[level]+''; + counts += 'Level '+level+'' + if(minlvl > level) + counts += 'zoom in'; + else + counts += window.plugin.portalcounts.PortalsRes[level]; + counts += ''; } counts += ' '; - counts += 'Neutral: '+window.plugin.portalcounts.neuP+' Portal(s)'; + counts += 'Neutral: '; + if(minlvl > 0) + counts += 'zoom in to see unclaimed'; + else + counts += window.plugin.portalcounts.neuP; + counts += ' Portal(s)'; } else counts += 'No Portals in range !'; counts += '';