Skip to content

Instantly share code, notes, and snippets.

@cfj
Last active April 2, 2021 18:17
Show Gist options
  • Star 34 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cfj/9841823 to your computer and use it in GitHub Desktop.
Save cfj/9841823 to your computer and use it in GitHub Desktop.
console.clog
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);
};
@cfj
Copy link
Author

cfj commented Mar 28, 2014

console.clog

@toddmotto
Copy link

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);
};

@logankoester
Copy link

Nooooooo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment