From 2eb010758e6838b9d07109ec3373694a8e84bd9f Mon Sep 17 00:00:00 2001 From: Seven Du Date: Wed, 31 Jul 2013 00:23:07 +0800 Subject: [PATCH] Hope can fix on IE, not tested --- htdocs/portal/assets/js/ie-console.js | 19 +++++++++++++++++++ htdocs/portal/index.html | 1 + 2 files changed, 20 insertions(+) create mode 100644 htdocs/portal/assets/js/ie-console.js diff --git a/htdocs/portal/assets/js/ie-console.js b/htdocs/portal/assets/js/ie-console.js new file mode 100644 index 0000000000..60f73cceec --- /dev/null +++ b/htdocs/portal/assets/js/ie-console.js @@ -0,0 +1,19 @@ +// var ie_console_alertFallback = true; +// var ie_console_divFallback = true; + +if (typeof console === "undefined" || typeof console.log === "undefined") { + console = {}; + + if (typeof ie_console_divFallback != "undefined") { + console.log = function(msg) { + $('#ie_console_debug_div').append(msg); + $('#ie_console_debug_div').append("
"); + } + } else if (typeof ie_console_alertFallback != "undefined" ) { + console.log = function(msg) { + alert(msg); + }; + } else { + console.log = function() {}; + } +} diff --git a/htdocs/portal/index.html b/htdocs/portal/index.html index c1e9d3cfe4..351b09590e 100644 --- a/htdocs/portal/index.html +++ b/htdocs/portal/index.html @@ -687,6 +687,7 @@ +