remove the fuck adblock stuff
This commit is contained in:
parent
e85bc8496c
commit
743e807ce3
|
@ -905,10 +905,6 @@ section.main .content .share a {
|
||||||
|
|
||||||
.book-recommendations {}
|
.book-recommendations {}
|
||||||
|
|
||||||
#adblock-detected-message {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
span.recommended {
|
span.recommended {
|
||||||
padding: 3px 10px;
|
padding: 3px 10px;
|
||||||
background-color: #ffc;
|
background-color: #ffc;
|
||||||
|
@ -928,4 +924,4 @@ ul#taxonomy-items {
|
||||||
.taxonomy-item {
|
.taxonomy-item {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: 1em;
|
margin-right: 1em;
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,40 +67,6 @@
|
||||||
<script src="{{ .Site.BaseURL }}js/social-share-kit.min.js" defer></script>
|
<script src="{{ .Site.BaseURL }}js/social-share-kit.min.js" defer></script>
|
||||||
{{ end }}
|
{{ 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" . }}
|
{{ template "_internal/google_analytics_async.html" . }}
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user