Skip to content

Instantly share code, notes, and snippets.

@frumbert
Created October 27, 2017 00:05
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save frumbert/d18a3abf00b382ea0e1d4aa7f91853f8 to your computer and use it in GitHub Desktop.
Save frumbert/d18a3abf00b382ea0e1d4aa7f91853f8 to your computer and use it in GitHub Desktop.
Make a marquee on the browser title
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>argh!</title>
<script type="text/javascript">
message = "The quick brown 🦊 jumps over the lazy 🐶 ";
function step() {
message = message.substr(1) + message.substr(0,1);
document.title = message.substr(0,15);
}
</script>
</head>
<body onload="setInterval(step,100)">
<p>Do not do this. Ever. Unless you're fixing Javascript's emoji bug in string manipulation.</p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment