Created
February 26, 2018 02:25
-
-
Save lawvs/e7783c786ced9c8bd3492cfe45ca4c31 to your computer and use it in GitHub Desktop.
html标签状态改变时改变html标题
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
document.addEventListener('visibilitychange', function () { | |
document.hidden ? document.title = '(●—●)喔哟,崩溃啦!' | |
: document.title = '(/≧▽≦/)咦!又好了!' | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment