Forked from zivc/mostAnnoyingConsoleFunctionEver.js
Last active
August 29, 2015 14:03
-
-
Save kentaromiura/737f8f894c14eb823612 to your computer and use it in GitHub Desktop.
amend the mostAnnoyingConsoleFunctionEver to use the proper font
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
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