More actions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<html> | <html> | ||
</script> | |||
<style> | |||
#alert { | |||
display: none; | |||
background-color: rgb(252, 219, 219); | |||
border: 1px solid green; | |||
position: fixed; | |||
height: 80px; | |||
width: 250px; | |||
left: 40%; | |||
top: 2%; | |||
padding: 6px 8px 8px; | |||
text-align: center; | |||
} | |||
p { | |||
font-size: 18px; | |||
color: green; | |||
} | |||
button { | |||
border-radius: 12px; | |||
height: 2rem; | |||
padding: 7px; | |||
cursor: pointer; | |||
border: 2px solid green; | |||
background-color: aqua; | |||
} | |||
#close { | |||
position: absolute; | |||
right: 20px; | |||
bottom: 10px; | |||
} | |||
</style> | |||
<script type="text/javascript"> | <script type="text/javascript"> | ||
function detectAdblock(){const adblockTests={uBlockOrigin:{url:"https://incolumitas.com/data/pp34.js?sv=",id:"837jlaBksSjd9jh"},adblockPlus:{url:"https://incolumitas.com/data/neutral.js?&ad_height=",id:"hfuBadsf3hFAk"}};function canLoadRemoteScript(obj){return new Promise(function(resolve,reject){var script=document.createElement("script");script.onload=function(){if(document.getElementById(obj.id)){resolve(false)}else{resolve(true)}};script.onerror=function(){resolve(true)};script.src=obj.url;document.body.appendChild(script)})}return new Promise(function(resolve,reject){let promises=[canLoadRemoteScript(adblockTests.uBlockOrigin),canLoadRemoteScript(adblockTests.adblockPlus)];Promise.all(promises).then(results=>{resolve({uBlockOrigin:results[0],adblockPlus:results[1]})}).catch(err=>{reject(err)})})} | function detectAdblock(){const adblockTests={uBlockOrigin:{url:"https://incolumitas.com/data/pp34.js?sv=",id:"837jlaBksSjd9jh"},adblockPlus:{url:"https://incolumitas.com/data/neutral.js?&ad_height=",id:"hfuBadsf3hFAk"}};function canLoadRemoteScript(obj){return new Promise(function(resolve,reject){var script=document.createElement("script");script.onload=function(){if(document.getElementById(obj.id)){resolve(false)}else{resolve(true)}};script.onerror=function(){resolve(true)};script.src=obj.url;document.body.appendChild(script)})}return new Promise(function(resolve,reject){let promises=[canLoadRemoteScript(adblockTests.uBlockOrigin),canLoadRemoteScript(adblockTests.adblockPlus)];Promise.all(promises).then(results=>{resolve({uBlockOrigin:results[0],adblockPlus:results[1]})}).catch(err=>{reject(err)})})} |
Revision as of 02:32, 6 October 2022