V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
jianghu52
V2EX  ›  问与答

ublock 可以屏蔽那种写在页面上的 js 么

  •  
  •   jianghu52 · 2016-03-13 12:24:16 +08:00 · 2673 次点击
    这是一个创建于 2964 天前的主题,其中的信息可能已经有所发展或是发生改变。
    最近有个弹窗比较讨厌。
    <div id="qrrJ" a56314856c6c51211da7ac8abd4855af9="1" style="z-index: 2147483637 !important; box-sizing: border-box !important; position: fixed !important; bottom: 20px !important; right: 20px !important; width: 274px !important; height: 274px !important; padding: 10px 15px !important; box-shadow: rgba(0, 0, 0, 0.14902) 1px 1px 5px, rgba(0, 0, 0, 0.2) 0px 2px 4px !important; border-radius: 3px !important; text-align: center !important; transition: bottom 0.5s ease !important; -webkit-transition: bottom 0.5s ease !important; background: rgb(255, 251, 212) !important;"></div>
    写了规则如下
    ##div[style="z-index: 2147483637;"]
    ##div[style="bottom: 20px !important; right: 20px !important;"]
    都不好使。
    他的 ID 。 width.height 都是随机变化的。随意没办法写过滤规则。
    而且这个弹窗是在整个页面加载完成之后才出来的。我怀疑他是写在某些 js 里面的。我查了下他加载的 js 。表面上看只有 jQuery 的 js 。所以我怀疑是页面上自带的。不知道 ublock 能不能屏蔽页面自带的 js
    3 条回复    2016-03-13 15:00:42 +08:00
    int64ago
        1
    int64ago  
       2016-03-13 13:43:12 +08:00 via Android   ❤️ 1
    ID 变化的话那就用相对位置
    honeycomb
        2
    honeycomb  
       2016-03-13 14:28:50 +08:00   ❤️ 1
    一个办法是禁止 inline script ,另外,似乎新一些的 ublock origin 似乎有一个针对弹窗的新特性
    jianghu52
        3
    jianghu52  
    OP
       2016-03-13 15:00:42 +08:00
    @honeycomb 请教一下具体的例子是什么样的。没见过 inline script 是什么东西。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5090 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 09:37 · PVG 17:37 · LAX 02:37 · JFK 05:37
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.