<style>
.modal {
display: none;
position: fixed;
z-index: 1;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgb(0, 0, 0);
background-color: rgba(0, 0, 0, 0.4);
}
.modal-content {
background-color: #fefefe;
margin: 5% auto;
padding: 60px 0px;
border: 1px solid #888;
width: 50%;
text-align: center;
}
.modal-title {
line-height: 28px;
display:block;
margin-bottom:40px;
color: #2f5492;
font-size: 26px;
}
.modal-p {
font-size: 20px;
margin-top:15px;
font-weight:600;
}
.modal-x {
margin-top: 40px;
text-transform: uppercase;
color: #2f5492;
letter-spacing: 0.14em;
font-size: 16px;
font-weight:600;
}
</style>
<script>
function disableScrolling(){
var x=window.scrollX;
var y=window.scrollY;
window.onscroll=function(){window.scrollTo(x, y);};
}
function adBlockDownload()
{
alert("Please disable your ad blocker for Kansiris.org and download.");
}
function adBlockFunction()
{
setTimeout(function() {
document.getElementById('myModal').style.display = 'block';
ga('send', 'event', 'Blocker', 'click','Blocker');
},2000);
disableScrolling();
//document.getElementById('ab-message').style.display = 'block';
var b = document.getElementById('downloadScript');
b.setAttribute("href", "#block");
b.setAttribute("onclick", "adBlockDownload();");
}
</script>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js" onerror="adBlockFunction();"></script>
<div class='modal' id='myModal'>
<div class='modal-content'>
<b class='modal-title'>Thanks for visiting Kansiris</b>
<p class='modal-p'>We notice you have an ad blocker on.</p>
<p class='modal-p'>Advertisements help us provide quality content.</p>
<p class='modal-x'>Please turn ad blocker off for Kansiris.org</p>
</div>
</div>


0 comments:
Post a Comment
Note: only a member of this blog may post a comment.