From 8bb0ddd75b6b2160198fa362a2b8f67d7e029a0a Mon Sep 17 00:00:00 2001 From: sostler Date: Tue, 9 Feb 2010 21:03:48 -0500 Subject: Guard references to console --- static/js/pichat.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'static/js') diff --git a/static/js/pichat.js b/static/js/pichat.js index fb1c655..a8557c1 100755 --- a/static/js/pichat.js +++ b/static/js/pichat.js @@ -181,16 +181,15 @@ function refresh() { UnseenMsgCounter += messages.length; } } catch(e) { - if (IsAdmin) { - alert("Exception in refresh"); - console.log(e); + if (IsAdmin && window.console) { + console.error(e); } } setTimeout(refresh, 1000); }; var onError = function(resp, textStatus, errorThrown) { - if (IsAdmin) { - console.log(resp, textStatus, errorThrown); + if (IsAdmin && window.console) { + console.error(resp, textStatus, errorThrown); } setTimeout(refresh, 1000); }; @@ -237,7 +236,6 @@ function initProfile() { data: { 'attr': attr, 'val': newVal } }); if (attr == 'avatar') { - console.log(newVal); if (newVal != "") { var s = ''; $('#avatarPic').replaceWith(s).show(); -- cgit v1.2.3-70-g09d2