Permalink
Browse files

Updated to a proper conversion of H5BP plugins.js

  • Loading branch information...
1 parent e33dbed commit 2ea569987d2ce18cfa94b3d08caadca68892283b @russfrisch committed Jun 26, 2011
Showing with 9 additions and 8 deletions.
  1. +9 −8 assets/plugins.js.coffee
View
@@ -1,19 +1,20 @@
# usage: log('inside coolFunc', this, arguments);
# paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
-window.log = () ->
+window.log = ->
log.history = log.history or []
- log.history.push(arguments)
+ log.history.push arguments
if @console
arguments.callee = arguments.callee.caller
- console.log(Array.prototype.slice.call(arguments))
+ console.log Array::slice.call(arguments)
# make it safe to use console.log always
-class Console
- constructor: () ->
- log: () ->
- window.log arguments
+((b) ->
+ c = ->
+ d = "assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(",")
-window.console = window.console || new Console()
+ while a = d.pop()
+ b[a] = b[a] or c
+) window.console = window.console or {}
# place any jQuery/helper plugins in here, instead of separate, slower script files.

0 comments on commit 2ea5699

Please sign in to comment.