@理丠-Lǐ_Qiū

——(不是谁的英雄,不过自我意识的奴隶)「Not Someone's Hero, but a Slave of Self-consciousness」

隐私政策|Privacy Policy作品集|Works关于作者|About Author

分类|Category:

发布|Posted:

加快网站显示速度,Adsense延迟加载代码

1、删除所有谷歌广告,脚本标记代码

(包括其它自动广告、手动广告)

<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5720871895974674" crossorigin="anonymous"></script>

2、添加 Adsense LazyLoad 代码

<script>
	var lazyloadads = false;
	window.addEventListener("scroll", function() {
		if ((document.documentElement.scrollTop != 0 && lazyloadads === false) || (document.body.scrollTop != 0 && lazyloadads === false)) {
			(function() {
				var ad = document.createElement('script');
				ad.type = 'text/javascript';
				ad.async = true;
				ad.src = 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5720871895974674';
				var sc = document.getElementsByTagName('script')[0];
				sc.parentNode.insertBefore(ad, sc);
			})();
			lazyloadads = true;
		}
	}, true)
	</script>

2021.11.27
互联网

更新|Modified:

向前|Previous:
往后|Next:

联系|Email

抖音,今日头条,微信公众号TikTokTwitter,Instagram

——(知识共享:署名-非商业性使用-禁止演绎)「CC BY-NC-ND」

©理丠