diff --git a/main.js b/main.js index a489f887..15c8019a 100644 --- a/main.js +++ b/main.js @@ -155,7 +155,7 @@ window.FIELD_MU_DISPLAY_AREA_ZOOM_RATIO = 0.001; // Point tolerance for displaying MU's window.FIELD_MU_DISPLAY_POINT_TOLERANCE = 60 -window.COLOR_SELECTED_PORTAL = '#f00'; +window.COLOR_SELECTED_PORTAL = '#f0f'; window.COLORS = ['#FF9900', '#0088FF', '#03DC03']; // none, res, enl window.COLORS_LVL = ['#000', '#FECE5A', '#FFA630', '#FF7315', '#E40000', '#FD2992', '#EB26CD', '#C124E0', '#9627F4']; window.COLORS_MOD = {VERY_RARE: '#F78AF6', RARE: '#AD8AFF', COMMON: '#84FBBD'}; diff --git a/plugins/portal-highlighter-bad-deployment-distance.user.js b/plugins/portal-highlighter-bad-deployment-distance.user.js index c85a61c5..2f44eb32 100644 --- a/plugins/portal-highlighter-bad-deployment-distance.user.js +++ b/plugins/portal-highlighter-bad-deployment-distance.user.js @@ -35,7 +35,6 @@ window.plugin.portalHighlighterBadDeploymentDistance.highlight = function(data) data.portal.setStyle(params); } } - window.COLOR_SELECTED_PORTAL = '#f0f'; } var setup = function() { diff --git a/plugins/portal-highlighter-can-make-level.user.js b/plugins/portal-highlighter-can-make-level.user.js index f4eca8de..18fa8327 100644 --- a/plugins/portal-highlighter-can-make-level.user.js +++ b/plugins/portal-highlighter-can-make-level.user.js @@ -33,8 +33,6 @@ window.plugin.portalHighligherPortalsCanMakeLevel.highlight = function(data,high data.portal.setStyle({color: COLORS[getTeam(data.portal.options.details)], fillOpacity: 0.5}); } - - window.COLOR_SELECTED_PORTAL = '#f0f'; } //determines the level of poral a user can make all on their own diff --git a/plugins/portal-highlighter-infrastructure.user.js b/plugins/portal-highlighter-infrastructure.user.js index 222ee0b8..50d9b98f 100644 --- a/plugins/portal-highlighter-infrastructure.user.js +++ b/plugins/portal-highlighter-infrastructure.user.js @@ -47,7 +47,6 @@ window.plugin.portalInfrastructure.highlight = function(data) { if(color !== '') { var params = {fillColor: color, fillOpacity: opa}; data.portal.setStyle(params); - window.COLOR_SELECTED_PORTAL = '#f0f'; } } diff --git a/plugins/portal-highlighter-level-color.user.js b/plugins/portal-highlighter-level-color.user.js index ad2e28d1..2271395f 100644 --- a/plugins/portal-highlighter-level-color.user.js +++ b/plugins/portal-highlighter-level-color.user.js @@ -26,7 +26,6 @@ window.plugin.portalHighligherPortalsLevelColor.colorLevel = function(data) { var portal_level = Math.floor(getPortalLevel(d)); var opacity = .6; data.portal.setStyle({fillColor: COLORS_LVL[portal_level], fillOpacity: opacity}); - window.COLOR_SELECTED_PORTAL = '#f0f'; } var setup = function() { diff --git a/plugins/portal-highlighter-missing-resonators.user.js b/plugins/portal-highlighter-missing-resonators.user.js index 9457ad42..4cb0af1a 100644 --- a/plugins/portal-highlighter-missing-resonators.user.js +++ b/plugins/portal-highlighter-missing-resonators.user.js @@ -52,7 +52,6 @@ window.plugin.portalsMissingResonators.highlight = function(data) { dashArray: null}); } } - window.COLOR_SELECTED_PORTAL = '#f0f'; } var setup = function() { diff --git a/plugins/portal-highlighter-mods.user.js b/plugins/portal-highlighter-mods.user.js index 7dfaed9f..ed01ccd1 100644 --- a/plugins/portal-highlighter-mods.user.js +++ b/plugins/portal-highlighter-mods.user.js @@ -52,8 +52,6 @@ window.plugin.portalHighligherMods.highlight = function(data, mod_type) { var params = {fillColor: color, fillOpacity: fill_opacity}; data.portal.setStyle(params); } - - window.COLOR_SELECTED_PORTAL = '#f0f'; } window.plugin.portalHighligherMods.highlightNoMods = function(data) { @@ -73,8 +71,6 @@ window.plugin.portalHighligherMods.highlightNoMods = function(data) { var params = {fillColor: color, fillOpacity: fill_opacity}; data.portal.setStyle(params); } - - window.COLOR_SELECTED_PORTAL = '#f0f'; } diff --git a/plugins/portal-highlighter-my-8-portals.user.js b/plugins/portal-highlighter-my-8-portals.user.js index 11b6f6f7..f286cd0b 100644 --- a/plugins/portal-highlighter-my-8-portals.user.js +++ b/plugins/portal-highlighter-my-8-portals.user.js @@ -39,7 +39,6 @@ window.plugin.portalHighligherMy8sOnPortals.highlight = function(data) { data.portal.setStyle({fillColor: color, fillOpacity: opacity}); } } - window.COLOR_SELECTED_PORTAL = '#f0f'; } var setup = function() { diff --git a/plugins/portal-highlighter-my-portals.user.js b/plugins/portal-highlighter-my-portals.user.js index 09d208b6..4f0790c2 100644 --- a/plugins/portal-highlighter-my-portals.user.js +++ b/plugins/portal-highlighter-my-portals.user.js @@ -62,7 +62,6 @@ window.plugin.portalHighligherMyPortals.highlight = function(data) { fillOpacity: 0.5}); } } - window.COLOR_SELECTED_PORTAL = '#f0f'; } var setup = function() { diff --git a/plugins/portal-highlighter-needs-recharge.user.js b/plugins/portal-highlighter-needs-recharge.user.js index 63422ec2..0fe3e9c5 100644 --- a/plugins/portal-highlighter-needs-recharge.user.js +++ b/plugins/portal-highlighter-needs-recharge.user.js @@ -35,7 +35,6 @@ window.plugin.portalHighligherNeedsRecharge.highlight = function(data) { data.portal.setStyle(params); } } - window.COLOR_SELECTED_PORTAL = '#f0f'; } var setup = function() { diff --git a/plugins/portal-highlighter-portal-ap-energy-relative.user.js b/plugins/portal-highlighter-portal-ap-energy-relative.user.js index a4e53cb6..b3b20673 100644 --- a/plugins/portal-highlighter-portal-ap-energy-relative.user.js +++ b/plugins/portal-highlighter-portal-ap-energy-relative.user.js @@ -58,7 +58,6 @@ window.plugin.portalHighligherPortalAPPerEnergyRelative.highlight = function(dat opacity = 1; } data.portal.setStyle({fillColor: color, fillOpacity: opacity}); - window.COLOR_SELECTED_PORTAL = '#f0f'; } } diff --git a/plugins/portal-highlighter-portal-ap-relative.user.js b/plugins/portal-highlighter-portal-ap-relative.user.js index f6c1cbf6..f1ae17ad 100644 --- a/plugins/portal-highlighter-portal-ap-relative.user.js +++ b/plugins/portal-highlighter-portal-ap-relative.user.js @@ -60,7 +60,6 @@ window.plugin.portalHighligherPortalAPRelative.highlight = function(data) { opacity = 1; } data.portal.setStyle({fillColor: color, fillOpacity: opacity}); - window.COLOR_SELECTED_PORTAL = '#f0f'; } window.plugin.portalHighligherPortalAPRelative.resetAPLevels = function() { diff --git a/plugins/portal-highlighter-portal-ap.user.js b/plugins/portal-highlighter-portal-ap.user.js index 5b907248..08fa9142 100644 --- a/plugins/portal-highlighter-portal-ap.user.js +++ b/plugins/portal-highlighter-portal-ap.user.js @@ -49,7 +49,6 @@ window.plugin.portalHighligherPortalAP.highlight = function(data) { opacity = 1; } data.portal.setStyle({fillColor: color, fillOpacity: opacity}); - window.COLOR_SELECTED_PORTAL = '#f0f'; } var setup = function() { diff --git a/plugins/portal-highlighter-portals-my-level.user.js b/plugins/portal-highlighter-portals-my-level.user.js index dddd1a2b..939bb0cd 100644 --- a/plugins/portal-highlighter-portals-my-level.user.js +++ b/plugins/portal-highlighter-portals-my-level.user.js @@ -42,7 +42,6 @@ window.plugin.portalHighligherPortalsMyLevel.colorLevel = function(below,data) { data.portal.setStyle({color: COLORS[getTeam(data.portal.options.details)], fillOpacity: 0.5}); } - window.COLOR_SELECTED_PORTAL = '#f0f'; } var setup = function() { diff --git a/plugins/portal-highlighter-portals-upgrade.user.js b/plugins/portal-highlighter-portals-upgrade.user.js index 569a1347..3d3d66b9 100644 --- a/plugins/portal-highlighter-portals-upgrade.user.js +++ b/plugins/portal-highlighter-portals-upgrade.user.js @@ -45,8 +45,6 @@ window.plugin.portalHighligherPortalsUpgrade.highlight = function(data) { data.portal.setStyle({color: COLORS[getTeam(data.portal.options.details)], fillOpacity: 0.5}); } - - window.COLOR_SELECTED_PORTAL = '#f0f'; } var setup = function() { diff --git a/plugins/portal-highlighter-with-lvl8-resonators.user.js b/plugins/portal-highlighter-with-lvl8-resonators.user.js index 01889199..42b31541 100644 --- a/plugins/portal-highlighter-with-lvl8-resonators.user.js +++ b/plugins/portal-highlighter-with-lvl8-resonators.user.js @@ -42,8 +42,7 @@ window.plugin.portalsWithL8Resonators.highlight = function(data) { var opa = has_L8 * 0.125; var params = {fillColor: color, fillOpacity: opa}; data.portal.setStyle(params); - } - window.COLOR_SELECTED_PORTAL = '#f0f'; + } } var setup = function() { diff --git a/plugins/show-more-portals.user.js b/plugins/show-more-portals.user.js index 26b3a6d6..a1af798c 100644 --- a/plugins/show-more-portals.user.js +++ b/plugins/show-more-portals.user.js @@ -35,9 +35,12 @@ window.plugin.showMorePortals.setup = function() { // yes, it is possible to increase this beyond "+1" - however, that will end up producing a rediculous number // of requests to the Niantic servers, giving many request failed errors/tile timeouts // (every increase by one requests four times as many data tiles) + var z = mapZoom + 1; + // UPDATE: due to the new smaller tiles used when zoomed out further (getThinnedEntitiesV4), it gets silly // doing this when zoomed out. so only boost when zoomed in - var z = mapZoom > 12 ? mapZoom + 1 : mapZoom; + if (z <= 12) z = mapZoom; + // limiting the mazimum zoom level for data retrieval reduces the number of requests at high zoom levels // (as all portal data is retrieved at z=17, why retrieve multiple z=18 tiles when fewer z=17 would do?) diff --git a/plugins/show-portal-weakness.user.js b/plugins/show-portal-weakness.user.js index 93742b1c..b1e84626 100644 --- a/plugins/show-portal-weakness.user.js +++ b/plugins/show-portal-weakness.user.js @@ -82,7 +82,6 @@ window.plugin.portalWeakness.highlightWeakness = function(data) { dashArray: null}); } } - window.COLOR_SELECTED_PORTAL = '#f0f'; } var setup = function() {