Anti Adblock - Blockadblock
Este script esta diseƱado para bloquear programas como:- AdBlock
- AdBlock Plus
- Brave adblock
- entre Otros
Incluir este archivo en la plantilla de Html o php
<?php include 'block.php'; ?>
crear archivo "blockadblock.php" en la misma raiz de la plantilla o si desean cambiarle la ruta lo pueden hacer en el anterior codigo.
<style>
.background{
background-attachment: fixed;
background-image: url('../img/wall.jpg');
background-size:100% 110%;
background-repeat: no-repeat;
}
.blocker{
text-align:center;
padding:0%;
color:white;
}
.blocker-buton{
position:relative;
background-color: #008CBA;
border: none;
color: black;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
border-radius: 12px;
left:43.2%;
}
.contenedor{
position:relative;
}
</style>
<body class="background">
<img src="Aquisuimagendeseada.png" alt="" style="position:relative;left:42.5%;width: 200px;height: 200px; top:50px;">
<div class="contenedor">
<h1 class="blocker" >Please disable AD Blocker and refresh the page</h1>
<h2 class="blocker" >This website is based and stay alive thanks to the advertising</h2>
<h3 class="blocker" >thank you for your comprehension</h3>
<a href="/" class="blocker-buton" > refresh this page</a>
</div>
</body>
Crear un archivo "block.php" en la misma raiz donde esta blockadblock.php.
<style>
#jstext8{
text-align:center;
}
</style>
<script>
// Function called if AdBlock is not detected
function adBlockNotDetected() {
}
// Function called if AdBlock is detected
function adBlockDetected() {
window.location= "/blockadblock.php";
}
// We look at whether FuckAdBlock already exists.
if(typeof fuckAdBlock !== 'undefined' || typeof FuckAdBlock !== 'undefined') {
// If this is the case, it means that something tries to usurp are identity
// So, considering that it is a detection
adBlockDetected();
} else {
// Otherwise, you import the script FuckAdBlock
var importFAB = document.createElement('script');
importFAB.onload = function() {
// If all goes well, we configure FuckAdBlock
fuckAdBlock.onDetected(adBlockDetected)
fuckAdBlock.onNotDetected(adBlockNotDetected);
};
importFAB.onerror = function() {
// If the script does not load (blocked, integrity error, ...)
// Then a detection is triggered
adBlockDetected();
};
importFAB.integrity = 'sha256-xjwKUY/NgkPjZZBOtOxRYtK20GaqTwUCf7WYCJ1z69w=';
importFAB.crossOrigin = 'anonymous';
importFAB.src = 'https://cdnjs.cloudflare.com/ajax/libs/fuckadblock/3.2.1/fuckadblock.min.js';
document.head.appendChild(importFAB);
}
</script>
Listo puedes refrescar tu pagina y se activara el anti adblock. alguna duda y pregunta pueden dejarla en los comentarios.
si deseas colaborar: puedes desactivar tu adblock en caso de tenerlo activado.
Vista Previa.
0 Comentarios