Uh oh!
There was an error while loading. Please reload this page.
This repository was archived by the owner on Nov 19, 2025. It is now read-only.
forked from InteractiveAdvertisingBureau/AdBlockDetection
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.html
More file actions
Latest commit
80 lines (77 loc) · 1.92 KB
/
Copy pathtest.html
File metadata and controls
80 lines (77 loc) · 1.92 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<!doctype html>
<html>
<head>
<title>AdBlock</title>
<metacharset="utf-8">
<metahttp-equiv="X-UA-Compatible" content="IE=edge">
<metaname="viewport" content="width=device-width, initial-scale=1">
<linkhref="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<linkhref="http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/styles/default.min.css" rel="stylesheet">
<style>
h5.bg-success,h5.bg-danger {
padding:8px;
border:1px solid #cccccc;
border-radius:4px;
text-align: center;
}
.center {
width:300px;
height:300px;
position: absolute;
left:50%;
top:50%;
margin-left:-150px;
margin-top:-150px;
}
.below {
width:300px;
height:300px;
position: absolute;
left:60%;
top:60%;
margin-left:-150px;
margin-top:-150px;
}
</style>
</head>
<body>
<divclass="center">
<h5class="bg-success" id="adb-not-enabled" style="display: none;">AdBlock is disabled</h5>
<h5class="bg-danger" id="adb-enabled" style="display: none;">AdBlock is enabled</h5>
</div>
<divclass="below">
<inputTYPE="button" onClick="history.go(0)" VALUE="Reload Page">
</div>
<scriptsrc="./adblockDetector.js"></script>
<script>
// Configure the adblock detector
(function(){
varenabledEl=document.getElementById('adb-enabled');
vardisabledEl=document.getElementById('adb-not-enabled');
functionadBlockDetected(){
enabledEl.style.display='block';
disabledEl.style.display='none';
}
functionadBlockNotDetected(){
disabledEl.style.display='block';
enabledEl.style.display='none';
}
if(typeofwindow.adblockDetector==='undefined'){
adBlockDetected();
}else{
window.adblockDetector.init(
{
debug: true,
found: function(){
adBlockDetected();
},
notFound: function(){
adBlockNotDetected();
}
}
);
}
}());
</script>
</body>
</html>