aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Kavlie <akavlie@gmail.com>2011-11-09 12:43:51 -0700
committerAaron Kavlie <akavlie@gmail.com>2011-11-09 12:43:51 -0700
commit4e896d34ec90c2b5216f6be8e37b1e41fbae2927 (patch)
tree8b6726389eb278062ac09c9cf9757fa478e272d0
parent72f063d36e6d4ecba1e65438b59e8edca4f70770 (diff)
downloadreevo-webirc-4e896d34ec90c2b5216f6be8e37b1e41fbae2927.tar.gz
reevo-webirc-4e896d34ec90c2b5216f6be8e37b1e41fbae2927.zip
Add code from HTML5 Boilerplate to prevent JS errors when console is unavailable.
-rw-r--r--js/util.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/js/util.js b/js/util.js
index d0e053d..6082c1a 100644
--- a/js/util.js
+++ b/js/util.js
@@ -1,3 +1,7 @@
1// make it safe to use console.log always
2(function(b){function c(){}for(var d="assert,clear,count,debug,dir,dirxml,error,exception,firebug,group,groupCollapsed,groupEnd,info,log,memoryProfile,memoryProfileEnd,profile,profileEnd,table,time,timeEnd,timeStamp,trace,warn".split(","),a;a=d.pop();){b[a]=b[a]||c}})((function(){try
3{console.log();return window.console;}catch(err){return window.console={};}})());
4
1// POLYFILLS 5// POLYFILLS
2// ========= 6// =========
3 7