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

uBlock Origin 怎么屏蔽输入框里的 placeholder

  •  
  •   find456789 · 2020-03-04 12:09:31 +08:00 · 2167 次点击
    这是一个创建于 1508 天前的主题,其中的信息可能已经有所发展或是发生改变。

    比如 知乎首页, 输入框 里的 八卦信息

    image.png

    7 条回复    2020-04-28 17:23:06 +08:00
    mercury233
        1
    mercury233  
       2020-03-04 12:24:51 +08:00
    感觉只能自定义 CSS 把 placeholder 文本颜色改成和背景一样
    matrix67
        2
    matrix67  
       2020-03-04 12:44:54 +08:00
    js 把 placeholder 改为空就行了
    find456789
        3
    find456789  
    OP
       2020-03-04 12:53:50 +08:00
    @mercury233
    谢谢,我干脆把整个输入框屏蔽了



    @matrix67

    谢谢
    uBlock Origin 似乎 无法添加自定义 js
    autoxbc
        4
    autoxbc  
       2020-03-04 13:10:44 +08:00   ❤️ 1
    uBlock 只用来处理纯 URL 规则,CSS 交给 Stylus,JS 管理器是 Tampermonkey

    各司其职,不要试图用一个工具通吃(Adblock Plus 的隐藏 DOM 元素规则十分蹩脚)
    203x
        5
    203x  
       2020-03-04 13:30:22 +08:00   ❤️ 1
    这样:

    www.zhihu.com##input.Input::-webkit-input-placeholder:style(color: transparent !important)
    find456789
        6
    find456789  
    OP
       2020-03-04 16:58:58 +08:00
    @autoxbc 谢谢你

    @203x 谢谢你,果然可以了,这个语法好奇怪呀
    Ringokun
        7
    Ringokun  
       2020-04-28 17:23:06 +08:00
    同样的问题 最后是用的 Stylus

    .Input::-webkit-input-placeholder{
    color: transparent;
    }

    感谢 @autoxbc
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2762 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 05:41 · PVG 13:41 · LAX 22:41 · JFK 01:41
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.