remove the fuck adblock stuff

This commit is contained in:
Ariejan de Vroom 2018-09-20 13:59:20 +02:00
parent e85bc8496c
commit 743e807ce3
Signed by: ariejan
GPG Key ID: AD739154F713697B
2 changed files with 1 additions and 39 deletions

View File

@ -905,10 +905,6 @@ section.main .content .share a {
.book-recommendations {}
#adblock-detected-message {
display: none;
}
span.recommended {
padding: 3px 10px;
background-color: #ffc;

View File

@ -67,40 +67,6 @@
<script src="{{ .Site.BaseURL }}js/social-share-kit.min.js" defer></script>
{{ end }}
<script>
function adBlockDetected() {
var el = document.getElementById('adblock-detected-message');
if (el !== null) {
el.style.display = 'block';
}
}
function adBlockNotDetected() {}
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>
{{ template "_internal/google_analytics_async.html" . }}
<script>