<script>
function adBlockNotDetected() {}
function adBlockDetected() {
var pics='https://xx.com/usr/themes/Ctrl/gaoci/'+Math.floor(Math.random()*(6)+1)+'.jpg';
$.NotificationApp.send("警告!","请针对本站关闭广告屏蔽插件,谢谢合作!","top-center","rgba(0,0,0,0.2)","error");
$(".wrapper").html('<div class="col-md-6" style="margin: 20vh auto 0 auto;font-size: 5vh;"><div class="card d-block"><div class="card-body"><img src="'+pics+'" alt="再见了您!"><br>由于您开了广告屏蔽插件,导致站长无力继续经营本网站,故网站关闭!给您带来的不便深感抱歉!</div></div></div>');
}
if(typeof fuckAdBlock !== 'undefined' || typeof FuckAdBlock !== 'undefined') {
adBlockDetected();
} else {
var importFAB = document.createElement('script');
importFAB.onload = function() {
fuckAdBlock.onDetected(adBlockDetected)
fuckAdBlock.onNotDetected(adBlockNotDetected);
};
importFAB.onerror = function() {
adBlockDetected();
};
importFAB.integrity = 'sha256-xjwKUY/NgkPjZZBOtOxRYtK20GaqTwUCf7WYCJ1z69w=';
importFAB.crossOrigin = 'anonymous';
importFAB.src = 'https://cdn.bootcss.com/fuckadblock/3.2.1/fuckadblock.min.js';
document.head.appendChild(importFAB);
}
</script>
这个脚本已经是很多年之前写的了。。。尝试过直接 block 这个 js 文件,但是没有成效。 看了一下 dev tools,正文资源本身已经加载了,但是一个窗口挡住无法查看。
1
liyang5945 2019-10-17 15:07:29 +08:00
发下原站点网址
|
2
ladypxy 2019-10-17 15:08:39 +08:00 via iPhone
如何屏蔽某绿色网站的反广告脚本……
|