Last active
September 13, 2017 13:46
-
-
Save sonictruth/7c2fea6d53818cbf92c24f81a722b9e2 to your computer and use it in GitHub Desktop.
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
// Talking console | |
// | |
// Support: http://caniuse.com/#search=SpeechSynthesisUtterance | |
// | |
// Copy paste the code into dev console or | |
// use http://mrcoles.com/bookmarklet/ to create a bookmarklet. | |
/* ✂️ ......................................................................................... */ | |
if(console.log.name !== 'talkLog') { | |
console.l = console.log; | |
console.log = function talkLog(){ | |
Array.prototype.forEach.call(arguments, function(a){ | |
if(typeof a !== 'string') | |
try { a = 'Object: ' + JSON.stringify(a); } catch (e) {} | |
window.speechSynthesis.speak(new SpeechSynthesisUtterance(a)); | |
}); | |
console.l.apply(this, arguments); | |
} | |
} | |
console.log("I'm ready master! Let's debug", window.location.hostname); | |
/* ✂️ ......................................................................................... */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment