Skip to content

Instantly share code, notes, and snippets.

@PandaWhisperer
Last active August 29, 2015 14:02
Show Gist options
  • Star 16 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PandaWhisperer/c161fd368cfe7b206aa2 to your computer and use it in GitHub Desktop.
Save PandaWhisperer/c161fd368cfe7b206aa2 to your computer and use it in GitHub Desktop.
var f = function() {
var v = speechSynthesis.getVoices().filter(function(v) { return v.name == 'Hysterical'; })[0],
s = ["ahahahaha", "stop it", "don't tickle me"],
t = new SpeechSynthesisUtterance(s[~~(Math.random()*s.length)]);
t.voice = v; speechSynthesis.speak(t);
};
Array.prototype.slice.call(document.querySelectorAll('a')).forEach(function(a) {
a.addEventListener('mouseover', f);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment