Hope can fix on IE, not tested

This commit is contained in:
Seven Du 2013-07-31 00:23:07 +08:00
parent 5454a95f5b
commit 2eb010758e
2 changed files with 20 additions and 0 deletions

View File

@ -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("<br>");
}
} else if (typeof ie_console_alertFallback != "undefined" ) {
console.log = function(msg) {
alert(msg);
};
} else {
console.log = function() {};
}
}

View File

@ -687,6 +687,7 @@
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="assets/js/ie-console.js"></script>
<script src="assets/js/jquery-1.9.1.min.js"></script>
<script src="assets/js/handlebars.js"></script>
<script src="assets/js/ember-1.0.0-rc.1.js"></script>