How to Add Download Button Timer Script in Blogger and Make Money
In this article today we will know how we can set the timer in the download button in our blog.
There are many benefits of installing a timer in the Download Button. With this, you can continuously increase the stay of the audience in your blog. By which your Adsense impression can increase and you can earn a lot.
You have to follow some steps to enable your download timer button. Below you will find some scripts that you have to paste into your blogger. But before pasting this script, you should download an HTML backup of your blog. Then follow the step.
How to do...
Step 1. This CSS script is to be pasted in the theme of your blog in the edit HTML below the head.
................... CSS...................
<style>
.astbutton {
background: linear-gradient(99deg, rgba(2,0,36,1) 0%, rgba(0,255,196,1) 0%, rgba(242,242,242,0.9192270658263305) 100%);
border: none;
color: black;
font-family: system-ui;
font-size: 17px;
text-decoration: none;
padding: 10px 20px;
cursor: pointer;
border-radius: 19px;
}
.infoblogger{
background: linear-gradient(99deg, rgba(2,0,36,1) 0%, rgba(0,255,196,1) 0%, rgba(242,242,242,0.9192270658263305) 100%);
border: none;
color: black;
font-family: system-ui;
font-size: 17px;
text-decoration: none;
padding: 10px 20px;
cursor: pointer;
border-radius: 19px;
}
</style>
Step 2. Then you have to copy and paste the javascript, go to Edit HTML
and past in the last before the body.
.......java script.......
<script type='text/javascript'>
//<![CDATA[
var downloadButton = document.getElementById("download");
var counter = 5;
var newElement = document.createElement("p");
newElement.innerHTML = "";
var id;
downloadButton.parentNode.replaceChild(newElement, downloadButton);
function startDownload() {
this.style.display = 'none';
id = setInterval(function () {
counter--;
if (counter < 0) {
newElement.parentNode.replaceChild(download button, newElement);
clearInterval(id);
} else {
newElement.innerHTML = +counter.toString() + " second.";
}
}, 1000);
};
var clickbtn = document.getElementById("btn");
clickbtn.onclick = startDownload;
//]]>
</script>
Step 3. After doing all this, you have to go to your post, in which you have to put the timer button.
.........HTML........
<div><br /></div>
<div style="text-align: center;"><a class="astbutton" href="####" id="download" target="_blank"> Download File </a><button class="infoblogger" id="btn"> Click Here </button>
</div>
CONTACT US IF YOU HAVE ANY PROBLEM







