Last active
December 19, 2015 02:39
-
-
Save shimabox/5885058 to your computer and use it in GitHub Desktop.
/*@cc_on!@*/false だけでIEかどうかの判定ができると聞いて /
alertとconsole.logのラッパー的な /
名前も簡易(alert + console.log)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;(function(ns){ | |
if(typeof ns.alog === 'function') return; | |
ns.alog = function(){ | |
var args = [].slice.call(arguments).concat(); | |
if (/*@cc_on!@*/false) { | |
return alert(args); | |
} | |
return console.log(args); | |
} | |
})(window); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment