Last active
April 2, 2021 18:17
-
-
Save cfj/9841823 to your computer and use it in GitHub Desktop.
console.clog
This file contains hidden or 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
window.console.clog = function(log){ | |
var message = typeof log === 'object' ? '%cLooks like you\'re trying to log an ' : '%cLooks like you\'re trying to log a ', | |
style = 'background:url(http://i.imgur.com/SErVs5H.png);padding:5px 15px 142px 19px;line-height:280px;'; | |
console.log.call(console, message + typeof log + '.', style); | |
}; |
Author
cfj
commented
Mar 28, 2014
Bit shorter, clippy ;)
window.console.clog = function(log){
var message = '%cLooks like you\'re trying to log a' + (typeof log === 'object' ? 'n' : ''),
style = 'background:url(http://i.imgur.com/SErVs5H.png);padding:5px 15px 142px 19px;line-height:280px;';
console.log.call(console, message + ' ' + typeof log + '.', style);
};
Nooooooo!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment