diff --git a/plugins/portal-highlighter-can-make-level.user.js b/plugins/portal-highlighter-can-make-level.user.js index 18fa8327..2c0a91fe 100644 --- a/plugins/portal-highlighter-can-make-level.user.js +++ b/plugins/portal-highlighter-can-make-level.user.js @@ -29,10 +29,7 @@ window.plugin.portalHighligherPortalsCanMakeLevel.highlight = function(data,high if( potential_level > current_level && potential_level === highlight_level) { color = 'red'; data.portal.setStyle({fillColor: color, fillOpacity: opacity}); - } else { - data.portal.setStyle({color: COLORS[getTeam(data.portal.options.details)], - fillOpacity: 0.5}); - } + } } //determines the level of poral a user can make all on their own diff --git a/plugins/portal-highlighter-missing-resonators.user.js b/plugins/portal-highlighter-missing-resonators.user.js index 4cb0af1a..74b99e7a 100644 --- a/plugins/portal-highlighter-missing-resonators.user.js +++ b/plugins/portal-highlighter-missing-resonators.user.js @@ -2,7 +2,7 @@ // @id iitc-plugin-highlight-portals-missing-resonators@vita10gy // @name IITC plugin: highlight portals missing resonators // @category Highlighter -// @version 0.1.0.@@DATETIMEVERSION@@ +// @version 0.1.1.@@DATETIMEVERSION@@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ @@ -46,11 +46,7 @@ window.plugin.portalsMissingResonators.highlight = function(data) { params["dashArray"] = dash; } data.portal.setStyle(params); - } else { - data.portal.setStyle({color: COLORS[getTeam(data.portal.options.details)], - fillOpacity: 0.5, - dashArray: null}); - } + } } } diff --git a/plugins/portal-highlighter-my-portals.user.js b/plugins/portal-highlighter-my-portals.user.js index 4f0790c2..63a9f216 100644 --- a/plugins/portal-highlighter-my-portals.user.js +++ b/plugins/portal-highlighter-my-portals.user.js @@ -2,7 +2,7 @@ // @id iitc-plugin-highlight-portals-my-portals@vita10gy // @name IITC plugin: highlight my portals // @category Highlighter -// @version 0.1.0.@@DATETIMEVERSION@@ +// @version 0.1.1.@@DATETIMEVERSION@@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ @@ -57,10 +57,7 @@ window.plugin.portalHighligherMyPortals.highlight = function(data) { if(color !== '') { data.portal.setStyle({fillColor: color, fillOpacity: opacity}); - } else { - data.portal.setStyle({color: COLORS[getTeam(data.portal.options.details)], - fillOpacity: 0.5}); - } + } } } diff --git a/plugins/portal-highlighter-portals-my-level.user.js b/plugins/portal-highlighter-portals-my-level.user.js index 939bb0cd..bfd802d6 100644 --- a/plugins/portal-highlighter-portals-my-level.user.js +++ b/plugins/portal-highlighter-portals-my-level.user.js @@ -38,10 +38,7 @@ window.plugin.portalHighligherPortalsMyLevel.colorLevel = function(below,data) { if((below && portal_level <= player_level) || (!below && portal_level >= player_level)) { data.portal.setStyle({fillColor: 'red', fillOpacity: opacity}); - } else { - data.portal.setStyle({color: COLORS[getTeam(data.portal.options.details)], - fillOpacity: 0.5}); - } + } } var setup = function() { diff --git a/plugins/portal-highlighter-portals-upgrade.user.js b/plugins/portal-highlighter-portals-upgrade.user.js index 3d3d66b9..0ac64e38 100644 --- a/plugins/portal-highlighter-portals-upgrade.user.js +++ b/plugins/portal-highlighter-portals-upgrade.user.js @@ -1,12 +1,12 @@ // ==UserScript== // @id iitc-plugin-highlight-portals-upgrade@vita10gy -// @name IITC plugin: highlight portals you can upgrade +// @name IITC plugin: highlight portals you can upgrade at all and to eilte level (6,7 or 8) // @category Highlighter -// @version 0.1.0.@@DATETIMEVERSION@@ +// @version 0.2.0.@@DATETIMEVERSION@@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ -// @description [@@BUILDNAME@@-@@BUILDDATE@@] Uses the fill color of the portals to highlight portals you can upgrade. Yellow means you can upgrade it at all. Orange means you can change the level. Red means you can make it your level or higher. +// @description [@@BUILDNAME@@-@@BUILDDATE@@] Upgradable - Yellow: you can upgrade it at all. Orange: you can change the level. Red: you can make it your level or higher. To Elite: Yellow - To Level 6. Orange - To Level 7. Red - To Level 8. // @include https://www.ingress.com/intel* // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* @@ -41,14 +41,38 @@ window.plugin.portalHighligherPortalsUpgrade.highlight = function(data) { } data.portal.setStyle({fillColor: color, fillOpacity: opacity}); - } else { - data.portal.setStyle({color: COLORS[getTeam(data.portal.options.details)], - fillOpacity: 0.5}); - } + } +} + +window.plugin.portalHighligherPortalsUpgrade.highlight_elite = function(data) { + var d = data.portal.options.details; + var current_level = getPortalLevel(d); + var potential_level = window.potentialPortalLevel(d); + var opacity = .8; + var color = ''; + potential_level = Math.floor(potential_level); + current_level = Math.floor(current_level); + + if( potential_level > current_level && potential_level >= 6) { + switch(potential_level) { + case 6: + color = 'yellow'; + break; + case 7: + color = 'orange'; + break; + case 8: + color = 'red'; + opacity = .9; + break; + } + data.portal.setStyle({fillColor: color, fillOpacity: opacity}); + } } var setup = function() { window.addPortalHighlighter('Upgradable', window.plugin.portalHighligherPortalsUpgrade.highlight); + window.addPortalHighlighter('Upgradable to Elite', window.plugin.portalHighligherPortalsUpgrade.highlight_elite); } // PLUGIN END //////////////////////////////////////////////////////////