Blogger Download Counter Script-03
Shakib<!-- css -->
<style>
.container-3{position: relative; display: flex; align-items: center; justify-content: center; flex-direction: column;}.starter-btn{position: relative; width: 260px; background-color: #40e7b6; color: #fff; padding: 18px 0; text-align: center; font-size: 1.3rem; font-weight: 400; border-radius: 5px; box-shadow: 0 5px 25px rgba(64, 232, 182, 0.5);}.starter-btn:hover{background-color: #06e1a1;}.countdown-3{margin-bottom: 20px; font-size: 1.5rem; font-weight: 700;}.countdown-3 span{color: #40e7b6; font-size: 1.5rem; font-weight: 800;}.waiting-text-3{font-size: 1.1rem; font-weight: 600; display: none;}.download-text-3{font-size: 1.1rem; font-weight: 600; display: none;}.download-text-3 .download-link-3{color: #40e7b6; font-weight: 800;}
</style>
<!-- HTML -->
<div class="container-3">
<a class="starter-btn">Download Files</a>
<div class="countdown-3"></div>
<div class="waiting-text-3">Please Wait..</div>
<div class="download-text-3">
If the download did't start automatically,
<a href="https://cutt.ly/aXmVCX0" class="download-link-3"> Click Here </a>
</div>
</div>
<!-- Javascript Function -->
<script>
var timeleft=20;const downloadButton=document.querySelector(".starter-btn"),countdown=document.querySelector(".countdown-3"),waitText=document.querySelector(".waiting-text-3"),downloadText=document.querySelector(".download-text-3"),downloadLink=document.querySelector(".download-link-3");downloadButton.addEventListener("click",()=>{downloadButton.style.display="none",countdown.innerHTML="Download will begin automatically in <span>"+timeleft+" </span> seconds.";var t=setInterval(function n(){if(timeleft-=1,countdown.innerHTML="Download will begin automatically in <span>"+timeleft+" </span> seconds.",timeleft<=0){clearInterval(t),waitText.style.display="block";let e="https://www.pixabin.com";window.location.href=e,downloadLink.href=e,setTimeout(()=>{waitText.style.display="none",downloadText.style.display="block"},4e3)}},1e3)});
</script>