// Define the countdown time in seconds
const countdownTime = 13;
// Define the function to start the countdown and redirect
function startCountdown() {
document.getElementById(‘download-button’).style.display = ‘none’;
document.getElementById(‘titletext’).style.display = ‘none’;
document.getElementById(‘countdown’).style.display = ‘block’;
let countdown = countdownTime;
const intervalId = setInterval(() => {
countdown–;
document.getElementById(‘countdown’).innerHTML = `Downloading in ${countdown} Seconds…`;
if (countdown === 0) {
clearInterval(intervalId);
window.location.href = document.getElementById(‘download-button’).getAttribute(‘data-url’);
document.getElementById(‘countdown’).innerHTML = “Downloading Completed!”;
}
}, 1000);
}
// Add event listener to the download button
document.getElementById(‘download-button’).addEventListener(‘click’, startCountdown);
// Get the download URL from the query string and set it as the download button’s URL
const urlParams = new URLSearchParams(window.location.search);
const downloadUrl = urlParams.get(‘url’);
document.getElementById(‘download-button’).setAttribute(‘data-url’, downloadUrl );
document.addEventListener(‘contextmenu’, event => event.preventDefault());
document.addEventListener(‘copy’, event => event.preventDefault());