summaryrefslogtreecommitdiff
path: root/static/drive.html
blob: c6c405dbf32b8ebe541405094e104071f53709b9 (plain)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>MASSGRAVE Drive 💀</title>
        <link rel="stylesheet" href="css/water.min.css">
    </head>
    <body>
        <h1>📂 MASSGRAVE Drive</h1>
        <p>Welcome to MASSGRAVE Drive! You can find your requested file below.</p>

        <h2 style="word-break:break-all" id="file-title">💾 Loading...</h2>

        <p>Please click <i>Download file</i> to download the requested file.</p>

        <form method="GET" action="" id="download-form">
            <button type="submit">Download file</button>
        </form>

        <footer>© <span id="year"></span> <a href="https://massgrave.dev">MASSGRAVE</a> 💀</footer>

        <script>
            document.getElementById('year').textContent = new Date().getFullYear();

            const hash = window.location.hash.substring(1);
            const filename = decodeURIComponent(hash);

            if (filename) {
                document.title = filename + ' | MASSGRAVE Drive';
                document.getElementById('file-title').textContent = '💾 ' + filename;

                const baseUrl = atob('aHR0cHM6Ly9hcmNoaXZlLmlzZG4ubmV0d29yay93aW5kb3dzLw');
                const downloadUrl = baseUrl + encodeURIComponent(filename)
                document.getElementById('download-form').action = downloadUrl;
            } else {
                document.getElementById('file-title').textContent = '💾 No file specified';
                document.querySelector('button[type="submit"]').disabled = true;
            }
        </script>
    </body>
</html>