标签闪光保留

html
阅读 39 收藏 0 点赞 0 评论 0

tab-flash-retention
<script>
  var tabF = (function() {
    var ot = document.title,
      msg = 'Come Back - More Offers',
      toId,
      blink = function() {
        document.title = document.title == msg ? 'Thank You' : msg;
      },
      clear = function() {
        setTimeout(function() {
          clearInterval(toId);
          document.title = ot;
          window.onmousemove = null;
          toId = null;
        }, 1000);
      };
    return function() {
      if (!toId) {
        toId = setInterval(blink, 1000);
        window.onmousemove = clear;
      }
    };
  })();
  tabF();
</script>
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号