Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In practice, the youtube api has other cases in that switch expression (ENDED, PAUSED, etc). For those, you would use the following in their case statement: document.title = document.title.replace("\u25B6","");

And to revise my original code, this is what you could use in the PLAYING statement to prevent multiple play symbols: document.title = "\u25B6" + document.title.replace("\u25B6","");

Notice, too, that I replaced the "▶" with the appropriate javascript encoding.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: