aboutsummaryrefslogtreecommitdiff
path: root/cs2-simple-website/js/main.js
blob: 0150af1801ee842cc11f6893e73dd30f19971aea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
var space = " ";
var speed = "60";
var pos = 0;
var msg = "// Hom.e "; /*Enter the scrolling title as the msg variable's value.*/

function Scroll() {
    document.title = msg.substring(pos, msg.length) + space + msg.substring(0, pos);
    pos++;
    if (pos > msg.length) pos = 0;
    window.setTimeout("Scroll()", speed);
}
Scroll();

// Copyied from my GitHub repo: https://github.com/8cy/scrolling-html-title/blob/master/docs/js/main.js