Skip to content

Instantly share code, notes, and snippets.

@Zer0t3ch
Forked from lukes/rant.js
Last active August 29, 2015 14:11
Show Gist options
  • Save Zer0t3ch/bb70960319c3a74b6d76 to your computer and use it in GitHub Desktop.
Save Zer0t3ch/bb70960319c3a74b6d76 to your computer and use it in GitHub Desktop.
// <rant> to actual rant
// (requires modern browsers)
var rants = document.getElementsByTagName('rant');
for (i=0;i<rants.length;i++) {
var rant = new SpeechSynthesisUtterance(rants[i].innerHTML);
window.speechSynthesis.speak(rant);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment