Skip to content

Instantly share code, notes, and snippets.

@zikes
Forked from LeaVerou/RAINBOWlog.js
Created March 12, 2014 23:39
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save zikes/9519016 to your computer and use it in GitHub Desktop.
Save zikes/9519016 to your computer and use it in GitHub Desktop.
(function(){
var log = console.log;
console.log = function(str) {
var css = 'background: linear-gradient(to right, red, yellow, lime, aqua, blue, fuchsia, red); color: white; font-weight: bold; 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);
}
})();
@harpreetsb
Copy link

for firefox too, please :/

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