Add the following code between Heads
<script>document.addEventListener('visibilitychange',function(){if(document.visibilityState=='hidden'){normal_title=document.title;document.title='记得回来哦~ ��';}else{document.title=normal_title;}});</script>
principle
- Leverage the visibilitychange API
- The visibilitychange event is fired when the browser tab is hidden or shown