Free javascript Hosting


embed-booster.js

Uploaded on Apr 02 2022 23:27 by nicolas

let div = document.createElement("div");
div.className += "popup-pongo";
div.innerHTML =
'<button id="close-popup-pongo">&times;</button><iframe id="inlineFrame" src="https://pngo.fr/Dd9yz7"></iframe>';
document.body.appendChild(div);

let overlay = document.createElement("div");
overlay.className += "overlay";
document.body.appendChild(overlay);

var styles = `
.popup-pongo {
background-color: #ffffff;
width: 90%;
height: 90%;
padding: 0;
position: absolute;
transform: translate(-50%,-50%);
left: 50%;
top: 50%;
z-index: 100000;
text-align: center;
height: 500px;
border-radius: 10px;
box-shadow: 10px 10px 70px 0px rgb(0 0 0 / 37%);
}
iframe#inlineFrame {
width: 100%;
height: 100%;
border-radius: 10px;
border: 0;
}
.overlay {
position: absolute;
width: 100%;
padding: 10px;
background: rgb(101 101 101 / 50%);
backdrop-filter: blur(5px);
height: 100%;
z-index: 10000;
left: 0;
top: 0;
}
.popup-pongo button {
display: block;
margin: 0 0 20px auto;
font-size: 30px;
color: #000000;
background: #ffffff;
border-radius: 100%;
width: 40px;
height: 40px;
border: none;
outline: none;
cursor: pointer;
position: absolute;
right: 10px;
top: 10px;
}
`;

var styleSheet = document.createElement("style");
styleSheet.type = "text/css";
styleSheet.innerText = styles;
document.head.appendChild(styleSheet);

window.addEventListener("load", function () {
setTimeout(function open(event) {
document.querySelector(".popup-pongo").style.display = "block";
}, 2000);
});

document
.querySelector("#close-popup-pongo")
.addEventListener("click", function () {
document.querySelector(".popup-pongo").style.display = "none";
});

Back to list