-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathredirect.html
83 lines (71 loc) · 2.94 KB
/
redirect.html
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!DOCTYPE html>
<html lang="en">
<head>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4734982214094550"
crossorigin="anonymous"></script>
<meta charset="UTF-8">
<title>ChafficPlugins</title>
<meta content="width=device-width, initial-scale=1" name="viewport"/>
<link rel="stylesheet" href="style/main.css">
<link rel="icon" type="image/x-icon" href="img/favicon.ico">
</head>
<body>
<h1 id="centeredTitle">ChafficPlugins</h1>
<h3 id="centeredSubTitle">Free high quality plugins for your Minecraft server!</h3>
<img src="img/bg.png" alt="" id="bgImg" onclick="window.open('https://chafficplugins.github.io')">
<script>
const urlParams = new URLSearchParams(window.location.search);
const plugin = urlParams.get('plugin');
const version = urlParams.get('version');
document.getElementById("centeredSubTitle").innerHTML = plugin + "-v" + version + " Download Page";
for (let i = 0; i <= 5; i++) {
setTimeout(() => {
document.getElementById("downloadButton").innerText = "Wait " + (5 - i) + " Seconds";
document.getElementById("scrollButton").innerText = "Wait " + (5 - i) + " Seconds";
if (i === 5) {
document.getElementById("downloadButton").disabled = false;
document.getElementById("downloadButton").innerText = "Download " + plugin + "-v" + version;
document.getElementById("scrollButton").disabled = false;
document.getElementById("scrollButton").innerText = "Scroll Down";
}
}, 1000 * i);
}
function download() {
//get ?plugin parameter and ?version parameter
window.open("https://github.com/ChafficPlugins/" + plugin + "/releases/download/v" + version + "/" + plugin + "-v" + version + ".jar")
}
function scrollDown() {
//scroll down to the download button slowly
window.scrollBy({
top: 1000,
left: 0,
behavior: 'smooth'
});
}
</script>
<div class="plugin-list">
<a id="hostingURL" href="https://shockbyte.com/billing/aff.php?aff=4416" target={"_blank"}
rel="noreferrer">Cheap Minecraft Server Hosting</a>
</div>
<div class="plugin-list">
<button id="scrollButton" disabled class="button" onclick="scrollDown()">Wait 5 seconds</button>
</div>
<div class="hostingConatiner">
<a href="https://shockbyte.com/billing/aff.php?aff=4416"><img id="hosting" src="https://shockbyte.com/assets/img/partners/twitch/shockbyte_affiliate.png" alt="Minecraft Server Hosting" /></a>
</div>
<div class="plugin-list">
<button id="downloadButton"
onclick="download()"
disabled>
Wait 5 Seconds
</button>
</div>
<a id="imprintLink" href="https://felixbeinssen.net/imprint" target={"_blank"}
rel="noreferrer">Imprint</a>
<footer>
<p id="copyright">
© ChafficPlugins 2019-2023
</p>
</footer>
</body>
</html>