Skip to content

Instantly share code, notes, and snippets.

@S2
Created February 17, 2015 10:34
Show Gist options
  • Save S2/34f89e31349a584174d6 to your computer and use it in GitHub Desktop.
Save S2/34f89e31349a584174d6 to your computer and use it in GitHub Desktop.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport" content="width=device-width">
</head>
<body>
</body>
<script type="text/javascript">
var title = "キタ(・∀・)コレ";
var displayLength = 3;
var l = 0;
var invert = false;
setInterval(function(){
if(invert){
l--;
}else{
l++;
}
if(l > displayLength){
invert = true
}
if(l == 0 ){
invert = false
}
var str = "";
for( var i = 0 ; i < l ; i++){
str += " ";
}
str += title;
console.log(str)
document.title = str;
} , 50);
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment