Created
November 8, 2019 01:46
-
-
Save cary205/467d23c999fade54dba87b77d414aa03 to your computer and use it in GitHub Desktop.
(つェ⊂) 我藏好了哦~
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
| var originTitle = document.title; | |
| var titleTime; | |
| document.addEventListener("visibilitychange", function() { | |
| if (document.hidden) { | |
| document.title = "(つェ⊂) 我藏好了哦~ " + originTitle; | |
| clearTimeout(titleTime); | |
| } else { | |
| document.title = "(*´∇`*) 被你发现啦~ " + originTitle; | |
| titleTime = setTimeout(function() { | |
| document.title = originTitle; | |
| }, 2000); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment