From 7ea73d06ae188dd41d40375f493bf707845007e8 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Wed, 18 Nov 2009 10:17:13 +0100 Subject: [PATCH] Log to browser error console automatically, if available. --- kronolith/js/kronolith.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kronolith/js/kronolith.js b/kronolith/js/kronolith.js index 4b9180b57..768b760fd 100644 --- a/kronolith/js/kronolith.js +++ b/kronolith/js/kronolith.js @@ -38,8 +38,8 @@ KronolithCore = { debug: function(label, e) { - if (!this.is_logout && Kronolith.conf.debug) { - alert(label + ': ' + (e instanceof Error ? e.name + '-' + e.message : Object.inspect(e))); + if (!this.is_logout && window.console && window.console.error) { + window.console.error(label, Prototype.Browser.Gecko ? e : $H(e).inspect()); } }, -- 2.11.0