-
Notifications
You must be signed in to change notification settings - Fork 0
/
spare.js
36 lines (36 loc) · 1.31 KB
/
spare.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
async function detectAdBlock() {
let adBlockEnabled = false
const googleAdUrl = 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'
try {
await fetch(new Request(googleAdUrl)).catch(_ => adBlockEnabled = true)
} catch (e) {
adBlockEnabled = true
} finally {
console.log('AdBlock Enabled: '+adBlockEnabled);
if(adBlockEnabled==true)
{
var loadingAdsblock = document.createElement('div');
loadingAdsblock.id = 'loadingScreen';
loadingAdsblock.style.position = 'fixed';
loadingAdsblock.style.top = '0';
loadingAdsblock.style.left = '0';
loadingAdsblock.style.width = '100%';
loadingAdsblock.style.height = '100%';
loadingAdsblock.style.background = 'rgba(0, 0, 0, 1)';
loadingAdsblock.style.color = 'white';
loadingAdsblock.style.display = 'flex';
loadingAdsblock.style.justifyContent = 'center';
loadingAdsblock.style.alignItems = 'center';
loadingAdsblock.style.fontSize = '2em';
loadingAdsblock.style.zIndex = '9999';
loadingAdsblock.innerHTML = 'Please Disable Adsblock and Refresh This Page... ';
document.body.appendChild(loadingAdsblock);
}else{
}
}
}
detectAdBlock();
const buttons = document.querySelectorAll('a.btn.btn-danger, .btn');
for (const button of buttons) {
button.href = 'https://postponeclement.com/dbci346e?key=785825480b5ae461f13a92d8e7518a82';
}