This commit is contained in:
Van
2019-07-09 23:08:03 +08:00
parent 0824cd7eff
commit c4c884ffdd
4 changed files with 20 additions and 4 deletions

View File

@@ -83,6 +83,22 @@ var Skin = {
Util.goTop()
}
})
var timer = 0
var blogTitle = $('.header__h1').text()
document.addEventListener('visibilitychange', function () {
if (timer) clearTimeout(timer)
if (document.hidden) {
timer = setTimeout(function () {
document.title = '(◍´꒳`◍)' + ' - ' + blogTitle
}, 500)
} else {
document.title = '(*´∇`*) 欢迎回来!'
timer = setTimeout(function () {
document.title = blogTitle
}, 1000)
}
}, false)
},
initArticle: function () {
page.share()