Jason' 检测你的广告位有没有元素就行,拦截器会把广告返回值拦截掉,可以设置如下:
<#if settings.enable_ads_block == true>
<!-- 自定义js -->
<script type="text/javascript">
window.onload = function() {
setTimeout(function() {
const adRoot = document.getElementsByClassName("fc-ab-root");
const adSection = document.querySelector("body > div.fc-ab-root > div.fc-dialog-container > section");
const adimg = document.querySelector("body > div.fc-ab-root > div.fc-dialog-container > section > header > h1 > div");
const adPcContent = document.querySelector("#aswift_0_host");
const adMobileContent = document.querySelector("#aswift_1_host");
if (!adPcContent && !adMobileContent){
adRoot[0].style.display = "flex";
adSection.style.display = "block";
adimg.style.display = "block";
}
}, 500);
};
</script>
</#if>
上面时谷歌广告防拦截的代码示例,参考上面这块设置就行