Implement giveaway closure logic with new giveaway-gate.js, update .htaccess for redirection after giveaway ends, and modify index.html and styles to reflect giveaway status. Enhance script.js to manage giveaway timer and visibility of related elements.
This commit is contained in:
1 parent
e376355464
commit
4a7d0a2665
6 files changed
+57
-22
No files matched your search
@@ -0,0 +1,16 @@
|
||||
// Runs before the page paints. Closes the giveaway at the end of
|
||||
// November 1, 2026 (Central), which is 2026-11-02 06:00:00 UTC.
|
||||
// To run the page again, update this instant and the matching
|
||||
// timestamp in .htaccess.
|
||||
(function () {
|
||||
var closeAt = "2026-11-02T06:00:00Z";
|
||||
window.GIVEAWAY_CLOSE = closeAt;
|
||||
|
||||
if (Date.now() < Date.parse(closeAt)) return;
|
||||
|
||||
document.documentElement.classList.add("giveaway-closed");
|
||||
|
||||
if (/\/giveaway(?:\/index\.html)?\/?$/.test(location.pathname)) {
|
||||
location.replace("/");
|
||||
}
|
||||
})();
|
||||
Reference in new issue
Block a user