Fixed reset of portal count if map is moved

This commit is contained in:
YenkyK 2013-03-25 13:59:11 +01:00
parent 14fffeb33e
commit 2f6334f4ed

View File

@ -1,7 +1,7 @@
// ==UserScript== // ==UserScript==
// @id iitc-plugin-portals-count@yenky // @id iitc-plugin-portals-count@yenky
// @name IITC plugin: Show total counts of portals // @name IITC plugin: Show total counts of portals
// @version 0.0.1.20130325.130149 // @version 0.0.2.20130325.135610
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@ // @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@ // @downloadURL @@DOWNLOADURL@@
@ -26,14 +26,14 @@ if(typeof window.plugin !== 'function') window.plugin = function() {};
// use own namespace for plugin // use own namespace for plugin
window.plugin.portalcounts = function() {}; window.plugin.portalcounts = function() {};
window.plugin.portalcounts.enlP = 0;
window.plugin.portalcounts.resP = 0;
window.plugin.portalcounts.neuP = 0;
//count portals for each level avalaible on the map //count portals for each level avalaible on the map
window.plugin.portalcounts.getPortals = function(){ window.plugin.portalcounts.getPortals = function(){
//console.log('** getPortals'); //console.log('** getPortals');
var retval=false; var retval=false;
window.plugin.portalcounts.enlP = 0;
window.plugin.portalcounts.resP = 0;
window.plugin.portalcounts.neuP = 0;
window.plugin.portalcounts.PortalsEnl = new Array(); window.plugin.portalcounts.PortalsEnl = new Array();
window.plugin.portalcounts.PortalsEnl[1] = 0; window.plugin.portalcounts.PortalsEnl[1] = 0;