// ==UserScript== // @id iitc-plugin-highlight-portals-upgrade@vita10gy // @name IITC plugin: highlight portals you can upgrade to a specific level // @category Highlighter // @version 0.1.0.@@DATETIMEVERSION@@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ // @description [@@BUILDNAME@@-@@BUILDDATE@@] Use the fill color of the portals to highlight portals you can upgrade to a specific level. // @include https://www.ingress.com/intel* // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* // @grant none // ==/UserScript== @@PLUGINSTART@@ // PLUGIN START //////////////////////////////////////////////////////// // use own namespace for plugin window.plugin.portalHighligherPortalsCanMakeLevel = function() {}; window.plugin.portalHighligherPortalsCanMakeLevel.highlight = function(data,highlight_level) { var d = data.portal.options.details; var current_level = Math.floor(getPortalLevel(d)); var potential_level = Math.floor(window.potentialPortalLevel(d)); var opacity = .7; if( potential_level > current_level && potential_level === highlight_level) { color = 'red'; data.portal.setStyle({fillColor: color, fillOpacity: opacity}); } } //determines the level of poral a user can make all on their own window.plugin.portalHighligherPortalsCanMakeLevel.playerCanSoloLevel = function(lvl) { var resonators_total = 0; var resonators_placed = 0; var resonator_level = PLAYER.level while(resonators_placed < 8) { for(var i = 0; i