Skip to content

Instantly share code, notes, and snippets.

@techsin
Created May 29, 2020 16:28
Show Gist options
  • Save techsin/dacf0c435ac145374ab6c312eaf9a698 to your computer and use it in GitHub Desktop.
Save techsin/dacf0c435ac145374ab6c312eaf9a698 to your computer and use it in GitHub Desktop.
animation on title
var str = '-¯-_';
var i;
var j = 0;
document.title = '‎';
setInterval(function(){
document.title = document.title + str[j++];
j = j % str.length;
i = i || 0;
i = ++i % (str.length * 5);
if (!i) document.title = '‎';
},400)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment