From a28a0737e4cd9c967a1717b12c22b5901c6cfb3b Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Wed, 23 Jul 2014 17:57:13 +0100 Subject: [PATCH] fix 'captured' being set when it should have been 'visited' for link-related messages fix crash when the selected portal is not in the map data (e.g. while loading), when the highlighter is selected --- plugins/uniques.user.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/uniques.user.js b/plugins/uniques.user.js index 095c81c5..7488161d 100644 --- a/plugins/uniques.user.js +++ b/plugins/uniques.user.js @@ -110,7 +110,7 @@ window.plugin.uniques.onPublicChatDataAvailable = function(data) { && markup[3][0] == 'TEXT' && markup[3][1].plain == ' to ' && markup[4][0] == 'PORTAL') { - plugin.uniques.setPortalCaptured(markup[2][1].guid); + plugin.uniques.setPortalVisited(markup[2][1].guid); } // search for "Your Lx Resonator on y was destroyed by z" @@ -151,7 +151,9 @@ window.plugin.uniques.updateChecked = function() { $('#visited').prop('checked', visited); $('#captured').prop('checked', captured); if (window.plugin.uniques.isHighlightActive) { - plugin.uniques.highlight({portal: portals[guid]}); + if (portals[guid]) { + plugin.uniques.highlight({portal: portals[guid]}); + } } }