Last active
June 28, 2020 08:26
-
-
Save kijuky/053c7988684f55bf7f0e7c3ddb50cf9b to your computer and use it in GitHub Desktop.
Speech Slack Bookmarklet
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
javascript:speechSynthesis.cancel();if(typeof%20_speechslackobserver!=="undefined")_speechslackobserver.disconnect();_speechslackobserver=new%20MutationObserver(rs=>{r=rs[rs.length-1];if(r.nextSibling)return;r.addedNodes.forEach(n=>{if(n.ariaExpanded!=="false")return;m=/:\d\d(.+)/gs.exec(n.textContent);if(m){speechSynthesis.speak(new%20SpeechSynthesisUtterance(m[1]))}})}).observe(document.querySelectorAll(".c-virtual_list__scroll_container")[1],{subtree:true,childList:true}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment