diff --git a/plugins/portal-highlighter-portals-my-level.user.js b/plugins/portal-highlighter-portals-my-level.user.js index 25058345..23ca6b5f 100644 --- a/plugins/portal-highlighter-portals-my-level.user.js +++ b/plugins/portal-highlighter-portals-my-level.user.js @@ -2,7 +2,7 @@ // @id iitc-plugin-highlight-portals-my-level@vita10gy // @name IITC plugin: highlight portals by my level // @category Highlighter -// @version 0.1.0.@@DATETIMEVERSION@@ +// @version 0.1.2.@@DATETIMEVERSION@@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ @@ -32,7 +32,10 @@ window.plugin.portalHighlighterPortalsMyLevel.aboveLevel = function(data) { window.plugin.portalHighlighterPortalsMyLevel.colorLevel = function(below,data) { var portal_level = data.portal.options.level; - var player_level = PLAYER.level; + + // as portal levels can never be higher than L8, clamp the player level to this for highlight purposes + var player_level = Math.min(PLAYER.level,8); + var opacity = .6; if((below && portal_level <= player_level) || (!below && portal_level >= player_level)) {