代码放到子主题child.js文件
var OriginTitile = document.title,
titleTime;
document.addEventListener("visibilitychange",
function () {
if (document.hidden) {
document.title = "你别走吖 o(╥﹏╥)o";
clearTimeout(titleTime)
} else {
document.title = "哇,你回来啦ヾ(o´∀`o)ノ ";
titleTime = setTimeout(function () {
document.title = OriginTitile
},
2000)
}
});