MediaWiki:Voice Output/code.js

$(function{ var buttons = document.getElementsByClassName('buttons')[0]; buttons.innerHTML = buttons.innerHTML + 'Speak '; document.getElementById("SpeakButton").addEventListener("click", function{ var url = 'http://www.masswerk.at/mespeak/mespeak.js'; $.getScript( url, function{ meSpeak.loadConfig("mespeak_config.json"); meSpeak.loadVoice('en-us.json'); var text = document.getElementById("mw-content-text").innerHTML ; meSpeak.speak(text); }); }); });