aboutsummaryrefslogtreecommitdiff
path: root/assets/js/embed/main.js
blob: 2f346d2e8366f99b39795e2aa11511df21f81c86 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Scrolling Title
var space = " ";
var speed = "60";
var pos = 0;
var msg = "// Veil ";

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();

// Previous, Random, Next
if (parent !== window) {
    const referer = encodeURIComponent(new URL(document.html).origin);

    function fixup(elem) {
        elem.href = elem.href + "?referer=" + referer;
    }

    fixup(document.getElementById("prev"));
    fixup(document.getElementById("random"));
    fixup(document.getElementById("next"));
}