From b1df5a6c1cd87016797a0582875ad6bd315010ff Mon Sep 17 00:00:00 2001 From: s1n <50817549+8cy@users.noreply.github.com> Date: Wed, 4 Mar 2020 01:58:07 -0800 Subject: int --- scrolling-title/js/main.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 scrolling-title/js/main.js (limited to 'scrolling-title/js') diff --git a/scrolling-title/js/main.js b/scrolling-title/js/main.js new file mode 100644 index 0000000..f2b20ac --- /dev/null +++ b/scrolling-title/js/main.js @@ -0,0 +1,12 @@ +var space = " "; +var speed = "60"; +var pos = 0; +var msg = "// s1n.ical "; /*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(); \ No newline at end of file -- cgit v1.2.3