html - 删除加载页面上的一些 <div>

标签 html google-chrome firefox

大多数网站展示广告。这些通常放在

<div class="googlead">//code here</div>

我转到 chrome 中的“检查元素”并删除了 div,网页看起来很漂亮。

那么那里有一些脚本吗

// PESUDOCODE
IF website url contains stackoverflow keyword THEN
    delete this <div> having this class="googlead"
ENDIF

最佳答案

是的,这些脚本已经以浏览器插件的形式为您编写,例如 Adblock Plus。 http://adblockplus.org/

如果你很好奇,你可以在这里看到他们各种插件的源代码:https://github.com/adblockplus

关于html - 删除加载页面上的一些 <div>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17142454/

相关文章:

javascript - 在 Firefox 和 Chrome 中使用 Javascript 来 CTRL+ 和 CTRL-

firefox - 什么是推测解析?

javascript - 在vue js2.0中设置选择列表的路由器链接

javascript - 添加邮件到 : with jQuery?

css - 在 windows chrome 和 windows firefox 上被顶部剪切的文本

javascript - 在 Google Chrome 的 native 播放器中打开视频 URL

javascript - 为什么 ASP.NET (3.5) 不总是加载外部 JavaScript?

javascript - 火狐插件 : how to debug simple-storage using addon builder

html - 如何避免嵌套位置 : absolute elements? 中的文本换行

html - rowspan 不适用于 thead 和 tbody