Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Adds play indicator (▶) to page title when any audio elements are playing.
$('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
You can’t perform that action at this time.