diff --git a/code/chat.js b/code/chat.js
index 6faea140..153c5105 100644
--- a/code/chat.js
+++ b/code/chat.js
@@ -347,7 +347,7 @@ window.chat.renderMsg = function(msg, nick, time, team) {
var s = 'style="color:'+COLORS[team]+'"';
var title = nick.length >= 8 ? 'title="'+nick+'" class="help"' : '';
var i = ['<', '>'];
- return '
'+t+' | '+i[0]+''+nick+''+i[1]+' | '+msg+' |
';
+ return ''+t+' | '+i[0]+''+nick+''+i[1]+' | '+msg+' |
';
}
diff --git a/code/portal_detail_display.js b/code/portal_detail_display.js
index e73a664a..15dd160e 100644
--- a/code/portal_detail_display.js
+++ b/code/portal_detail_display.js
@@ -24,6 +24,7 @@ window.renderPortalDetails = function(guid) {
var player = d.captured && d.captured.capturingPlayerId
? getPlayerName(d.captured.capturingPlayerId)
: null;
+ player = ''+player+'';
var playerText = player ? ['owner', player] : null;
var time = d.captured
diff --git a/code/portal_detail_display_tools.js b/code/portal_detail_display_tools.js
index 2861edf7..9a50e1b7 100644
--- a/code/portal_detail_display_tools.js
+++ b/code/portal_detail_display_tools.js
@@ -132,6 +132,7 @@ window.renderResonatorDetails = function(slot, level, nrg, dist, nick) {
var meter = '' + fill + lbar + '';
}
+ nick = ''+nick+'';
return [meter, nick || ''];
}
diff --git a/plugins/show-portal-weakness.user.js b/plugins/show-portal-weakness.user.js
index c01d1e64..b10a70f5 100644
--- a/plugins/show-portal-weakness.user.js
+++ b/plugins/show-portal-weakness.user.js
@@ -1,7 +1,7 @@
// ==UserScript==
// @id iitc-plugin-show-portal-weakness@vita10gy
// @name iitc: show portal weakness
-// @version 0.3.1
+// @version 0.4
// @namespace https://github.com/breunigs/ingress-intel-total-conversion
// @updateURL https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/show-portal-weakness.user.js
// @downloadURL https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/show-portal-weakness.user.js
@@ -78,8 +78,17 @@ window.plugin.portalWeakness.portalAdded = function(data) {
}
}
+window.plugin.portalWeakness.portalDataLoaded = function(data) {
+ $.each(data.portals, function(ind, portal) {
+ if(window.portals[portal[0]]) {
+ window.plugin.portalWeakness.portalAdded({portal: window.portals[portal[0]]});
+ }
+ });
+}
+
var setup = function() {
window.addHook('portalAdded', window.plugin.portalWeakness.portalAdded);
+ window.addHook('portalDataLoaded', window.plugin.portalWeakness.portalDataLoaded);
window.COLOR_SELECTED_PORTAL = '#f0f';
}