Daniel Rafflenbeul
unread,Oct 27, 2016, 4:07:02 PM10/27/16You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hello to all..
I got this ready made script for testing of adblocker.
Itself works fine.
But I need an option to define 2 links in cause of blocked or not.
Under the body opended there are 2 <p> classes.. Thats working.. and there i
need the Links..
If blocked use link 1 and is not blocked Link 2
Can anyone help me ?
The original script is :
<meta name="viewport" content="width=device-width">
<style type="text/css">
body {
background: #f8f8f8;
font-family: "Segoe UI", Arial, Helvetica, sans-serif;
font-weight: lighter;
color: #333;
padding: 2em;
}
.notblocked {
display: block;
}
.blocked {
display: none;
}
.adblock .notblocked {
display: none;
}
.adblock .blocked {
display: block;
}
</style>
</head>
<body>
<p class="notblocked">Nicht blocked</p>
<p class="blocked">AdBlock is enabled.</p>
<script>
(function(){
var test = document.createElement('div');
test.innerHTML = ' ';
test.className = 'adsbox';
document.body.appendChild(test);
window.setTimeout(function() {
if (test.offsetHeight === 0) {
document.body.classList.add('adblock');
}
test.remove();
}, 100);
})();
</script>
</body>
</html>