Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kentaromiura/737f8f894c14eb823612 to your computer and use it in GitHub Desktop.
Save kentaromiura/737f8f894c14eb823612 to your computer and use it in GitHub Desktop.
amend the mostAnnoyingConsoleFunctionEver to use the proper font
console.log = (function(log){
return function(str) {
var css = 'background: linear-gradient(to right, red, yellow, lime, aqua, blue, fuchsia, red); color: white; font-weight: bold;font-family:Comic Sans MS;font-size:13pt;';
var args = Array.prototype.slice.call(arguments);
args[0] = '%c' + args[0];
args.splice(1,0,css);
var speech = new SpeechSynthesisUtterance();
speech.text = str;
window.speechSynthesis.speak(speech);
return log.apply(console, args);
}
})(console.log);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment