-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathredirect.html
More file actions
161 lines (145 loc) · 7.9 KB
/
redirect.html
File metadata and controls
161 lines (145 loc) · 7.9 KB
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>ChafficPlugins - Download</title>
<meta name="description" content="Download ChafficPlugins Minecraft server plugins.">
<link rel="stylesheet" href="style/main.css">
<link rel="icon" type="image/x-icon" href="img/favicon.ico">
</head>
<body>
<div class="bg-decoration"></div>
<main class="download-page">
<div class="download-card">
<!-- Icon -->
<div class="download-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>
<polyline points="7 10 12 15 17 10"/>
<line x1="12" y1="15" x2="12" y2="3"/>
</svg>
</div>
<!-- Plugin info (filled by JS) -->
<h1 class="download-title" id="downloadTitle">Preparing download…</h1>
<span class="download-version" id="downloadVersion"></span>
<!-- Progress bar -->
<div class="download-progress">
<div class="download-progress-bar" id="progressBar"></div>
</div>
<p class="download-status" id="downloadStatus">Please wait…</p>
<!-- Action buttons -->
<div class="download-actions">
<button class="btn btn-primary" id="downloadButton" disabled onclick="download()">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>
<polyline points="7 10 12 15 17 10"/>
<line x1="12" y1="15" x2="12" y2="3"/>
</svg>
<span id="downloadButtonText">Wait 5s</span>
</button>
<a class="btn btn-secondary" href="https://chafficplugins.github.io">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M19 12H5M12 19l-7-7 7-7"/>
</svg>
Back to ChafficPlugins
</a>
</div>
<!-- Partner -->
<div class="download-partner">
<p class="download-partner-label">Recommended by Us</p>
<a class="download-partner-banner download-partner-featured" href="https://incogni.cello.so/awbgUw73CF4" target="_blank" rel="noopener noreferrer">
<div class="download-partner-badge">58% OFF</div>
<div class="download-partner-top">
<svg class="download-partner-icon download-partner-icon-shield" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/></svg>
<span class="download-partner-name">Incogni</span>
</div>
<div class="download-partner-offer">Remove your data from the web — <strong>58% off annual plans</strong></div>
<div class="download-partner-cta">
<span class="download-partner-cta-text">Get Incogni</span>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M3 10a.75.75 0 01.75-.75h10.638L10.23 5.29a.75.75 0 111.04-1.08l5.5 5.25a.75.75 0 010 1.08l-5.5 5.25a.75.75 0 11-1.04-1.08l4.158-3.96H3.75A.75.75 0 013 10z" clip-rule="evenodd"/></svg>
</div>
</a>
<a class="download-partner-banner" id="partnerBanner" href="#" target="_blank" rel="noopener noreferrer">
<div class="download-partner-top">
<svg class="download-partner-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/></svg>
<span class="download-partner-name" id="partnerName"></span>
</div>
<div class="download-partner-offer" id="partnerOffer"></div>
<div class="download-partner-cta">
<span class="download-partner-cta-text">Get Started</span>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M3 10a.75.75 0 01.75-.75h10.638L10.23 5.29a.75.75 0 111.04-1.08l5.5 5.25a.75.75 0 010 1.08l-5.5 5.25a.75.75 0 11-1.04-1.08l4.158-3.96H3.75A.75.75 0 013 10z" clip-rule="evenodd"/></svg>
</div>
</a>
</div>
</div>
<!-- Footer -->
<div class="download-footer">
<p class="download-footer-affiliate">Some links on this site are affiliate links. We may earn a commission at no extra cost to you.</p>
<a class="download-footer-link" href="https://felixbeinssen.net/imprint" target="_blank" rel="noopener noreferrer">Imprint</a>
<span class="download-footer-sep">·</span>
<a class="download-footer-link" href="/privacy.html">Privacy Policy</a>
</div>
</main>
<script>
// Parse URL parameters
const urlParams = new URLSearchParams(window.location.search);
const plugin = urlParams.get('plugin');
const version = urlParams.get('version');
// Populate page content
if (plugin && version) {
document.getElementById('downloadTitle').textContent = plugin;
document.getElementById('downloadVersion').textContent = 'v' + version;
document.title = plugin + ' v' + version + ' - ChafficPlugins Download';
}
// Countdown with progress bar
var countdown = 5;
var progressBar = document.getElementById('progressBar');
var statusEl = document.getElementById('downloadStatus');
var btnText = document.getElementById('downloadButtonText');
var btn = document.getElementById('downloadButton');
for (var i = 0; i <= countdown; i++) {
(function(step) {
setTimeout(function() {
var progress = (step / countdown) * 100;
progressBar.style.width = progress + '%';
if (step < countdown) {
var remaining = countdown - step;
statusEl.textContent = 'Your download will be ready in ' + remaining + ' second' + (remaining !== 1 ? 's' : '') + '.';
btnText.textContent = 'Wait ' + remaining + 's';
} else {
statusEl.textContent = 'Your file is ready.';
btnText.textContent = 'Download ' + plugin + '-v' + version + '.jar';
btn.disabled = false;
}
}, 1000 * step);
})(i);
}
// Affiliate partner rotation
var partners = [
{
name: 'Shockbyte',
url: 'https://shockbyte.com/billing/aff.php?aff=4416',
offer: 'Use code <span class="download-partner-code">LAUNCH</span> for 25% off'
},
{
name: 'WiseHosting',
url: 'https://wisehosting.com/aff.php?aff=3248',
offer: 'Reliable Minecraft server hosting'
}
];
var partner = partners[Math.floor(Math.random() * partners.length)];
document.getElementById('partnerBanner').href = partner.url;
document.getElementById('partnerName').textContent = partner.name;
document.getElementById('partnerOffer').innerHTML = partner.offer;
// GitHub release download
function download() {
window.open(
'https://github.com/ChafficPlugins/' + plugin +
'/releases/download/v' + version + '/' +
plugin + '-v' + version + '.jar'
);
}
</script>
</body>
</html>