-
-
Save jongalloway/0177c5a11dbf9c547676 to your computer and use it in GitHub Desktop.
Adds play indicator (▶) to page title when any audio elements are playing.
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
$('audio').on("play pause ended", function(){ | |
document.title = document.title.replace("\u25B6","") | |
$("audio").each(function(index) { | |
if(!this.paused) { | |
document.title = "\u25B6 " + document.title.replace("\u25B6 ","") | |
return false; | |
} | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment