From dcd00b83db30e043aea7626179c42d80ea57568b Mon Sep 17 00:00:00 2001 From: Stefan Breunig Date: Fri, 15 Feb 2013 16:56:01 +0100 Subject: [PATCH] add debugging output for sporadic issue #37 --- code/debugging.js | 1 + code/player_names.js | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/code/debugging.js b/code/debugging.js index b3f12ecc..dd1d2939 100644 --- a/code/debugging.js +++ b/code/debugging.js @@ -13,6 +13,7 @@ window.debug.renderDetails = function() { window.debug.printStackTrace = function() { var e = new Error('dummy'); console.log(e.stack); + return e.stack; } window.debug.clearPortals = function() { diff --git a/code/player_names.js b/code/player_names.js index 9bbc251e..85362f2c 100644 --- a/code/player_names.js +++ b/code/player_names.js @@ -44,6 +44,10 @@ window.resolvePlayerNames = function() { window.setPlayerName = function(guid, nick) { + if($.trim(('' + nick)).slice(0, 5) === '{"L":' && !window.alertFor37WasShown) { + window.alertFor37WasShown = true; + alert('You have run into bug #37. Please help me solve it!\nCopy and paste this text and post it here:\nhttps://github.com/breunigs/ingress-intel-total-conversion/issues/37\nIf copy & pasting doesn’t work, make a screenshot instead.\n\n\n' + window.debug.printStackTrace() + '\n\n\n' + JSON.stringify(nick)); + } localStorage[guid] = nick; }