WELCOME PUPUP MASSAGE PEST KRO BODY KE UPAR
<style>
#welcomePopup {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.6);
display: flex;
align-items: center;
justify-content: center;
z-index: 99999;
}
.popup-box {
background: #fff;
padding: 25px 30px;
border-radius: 12px;
text-align: center;
max-width: 320px;
width: 90%;
box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}
.close-btn {
margin-top: 15px;
padding: 8px 18px;
background: #ff4d4d;
color: #fff;
border: none;
border-radius: 6px;
cursor: pointer;
}
</style>
<div id='welcomePopup'>
<div class='popup-box'>
<h2>Welcome 😊</h2>
<p>Thanks for visiting our blog.</p>
<button class='close-btn' onclick='closePopup()'>Enter Site</button>
</div>
</div>
<script>
function closePopup() {
document.getElementById("welcomePopup").style.display = "none";
}
document.addEventListener("DOMContentLoaded", function() {
// Select all images inside post content
const postImages = document.querySelectorAll(".post-body img, .entry-content img");
postImages.forEach(function(img) {
// Create Download button
const downloadBtn = document.createElement("button");
downloadBtn.innerText = "Download";
downloadBtn.style.display = "block";
downloadBtn.style.margin = "10px auto";
downloadBtn.style.padding = "8px 16px";
downloadBtn.style.backgroundColor = "#ff5722";
downloadBtn.style.color = "#fff";
downloadBtn.style.border = "none";
downloadBtn.style.borderRadius = "5px";
downloadBtn.style.cursor = "pointer";
downloadBtn.style.fontSize = "14px";
// On click, download image
downloadBtn.addEventListener("click", function() {
const link = document.createElement("a");
link.href = img.src;
link.download = img.src.split("/").pop();
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
});
// Append button after image
img.parentNode.insertBefore(downloadBtn, img.nextSibling);
});
});
</script>
Comments
Post a Comment