Created
March 13, 2014 02:08
-
-
Save tarwn/9520722 to your computer and use it in GitHub Desktop.
Awesomify-er your console.log - extended from https://gist.github.com/LeaVerou/9518902
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(){ | |
var log = console.log; | |
console.log = function(str) { | |
var css = 'background-image: url("http://fc07.deviantart.net/fs70/f/2013/090/3/5/ocs____seine_unicorn_sprite_by_onisuu-d5zuuax.gif"), linear-gradient(to right, red, yellow, lime, aqua, blue, fuchsia, red); background-repeat: no-repeat, no-repeat; padding-left: 20px; color: white; font-weight: bold; font-size: 12pt; text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;'; | |
var args = Array.prototype.slice.call(arguments); | |
args[0] = '%c ' + args[0]; | |
args.splice(1,0,css); | |
return log.apply(console, args); | |
} | |
})(); |
Author
tarwn
commented
Apr 14, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment