diff options
| author | s1n <[email protected]> | 2019-09-18 12:47:53 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-09-18 12:47:53 -0700 |
| commit | 3ef80b56f7d7b37b57bc9c2ee1e31543670a8c69 (patch) | |
| tree | 055de43b9aee812a56c647b3dc34449301441f77 /js | |
| download | cs2-simple-website-og.tar.xz cs2-simple-website-og.zip | |
upload main filesog
Diffstat (limited to 'js')
| -rw-r--r-- | js/main.js | 14 | ||||
| -rw-r--r-- | js/redirect-to-home.js | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/js/main.js b/js/main.js new file mode 100644 index 0000000..0150af1 --- /dev/null +++ b/js/main.js @@ -0,0 +1,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
\ No newline at end of file diff --git a/js/redirect-to-home.js b/js/redirect-to-home.js new file mode 100644 index 0000000..d173793 --- /dev/null +++ b/js/redirect-to-home.js @@ -0,0 +1 @@ +document.location = "/home/"
\ No newline at end of file |