笔记(1)

笔记
修改网页标签变“呆萌”

 <script>
            window.materialVersion = "3.2.0-preview-3"
            var titleTime;
            document.addEventListener('visibilitychange', function() {
                if (document.hidden) {
                    document.title = '(*/ω\*) 哎哟~崩溃啦!  XSY&Free sky ';//XSY&Free sky 这个改为你的原本的标签
                    clearTimeout(titleTime);
                } else {
                    document.title = '(*´∇`*)咦!又好了?   XSY&Free sky ';//XSY&Free sky 这个改为你的原本的标签
                    titleTime = setTimeout(function() {
                        document.title = "XSY&Free sky";//XSY&Free sky 这个改为你的网站的标签
                    }, 2000);
                }
            });
        </script>
Last modification:April 4th, 2019 at 10:27 pm
If you think my article is useful to you, please feel free to appreciate

2 comments

  1. callg

    这样更好点吧

    window.materialVersion = "3.2.0-preview-3" var titleTime; var Title = document.title; document.addEventListener('visibilitychange', function() { if (document.hidden) { document.title = '(*/ω\*) 哎哟~崩溃啦!'; clearTimeout(titleTime); } else { if (document.title != Title) { document.title = '(*´∇`*)咦!又好了?'; titleTime = setTimeout(function() { document.title = Title; }, 2000); } } });
    1. XSY
      @callg

      都差不多啦

Leave a Comment