Last active
April 29, 2016 02:52
-
-
Save monkeym4ster/c190a0de4dbf1d70d80cd41073bf9f94 to your computer and use it in GitHub Desktop.
browser visibility change
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
oldTitle = document.title | |
document.addEventListener "visibilitychange", -> | |
document.title = if document.hidden then "~~~#{oldTitle}~~~" else oldTitle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment