Skip to content

Instantly share code, notes, and snippets.

@eblahm
Created October 20, 2015 12:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eblahm/15f304044821cbc38a9b to your computer and use it in GitHub Desktop.
Save eblahm/15f304044821cbc38a9b to your computer and use it in GitHub Desktop.
Make a 🐟 Swim Across Your Browser Tab
var renderIntervalInMillis = 50;
var characterWidth = 80;
var i = 0;
var whitespace = (new Array(characterWidth)).join('\u205f');
setInterval(function() {
var position = whitespace.length - (i++ % whitespace.length);
document.title = whitespace.substring(0, position) + '🐟' + whitespace.substring(position + 1);
}, renderIntervalInMillis);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment