避免 Google 自动广告在页面上乱入的方法

Spoony 54.3m2019-08-301345 次点击
I would imagine this can be easily accomplished through your site's css files? Google auto ads get wrapped in a div element with the class name "google-auto-placed". You could set that to display:none in your css file. So to keep the auto ads out of a division area with id name "no-ads", you could do something like this:

#no-ads > div.google-auto-placed {‌
display:none !important;
}

https://support.google.com/adsense/forum/AAAAKDuOfxQUjfjCFxvIBw/?hl=en&gpf=d/topic/adsense/UjfjCFxvIBw
收藏 ♥ 感谢
Spoony 小组长 2019-08-30 
body > .google-auto-placed{‌
visibility: hidden;
display: none;
}
RaspiSQH 117.65m 2019-08-31 
谷歌是怎么插到页面里面的.....
Spoony 小组长 2019-08-31 
在页面的 html body 内添加代码就行。
RaspiSQH 117.65m 2019-08-31 
@Spoony 然鹅他咋加进去的,中途还能肆意篡改么,他又不是空间商
Spoony 小组长 2019-08-31 
@RaspiSQH 这个是在服务器页面上加的。
自己加的话得用 Chrome 插件实现了,那也没有多大意义。

登录注册 后可回复。



GitHub