V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
find456789
V2EX  ›  问与答

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

  •  
  •   find456789 · Mar 4, 2020 · 3106 views
    This topic created in 2253 days ago, the information mentioned may be changed or developed.

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

    image.png

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



    @matrix67

    谢谢
    uBlock Origin 似乎 无法添加自定义 js
    autoxbc
        4
    autoxbc  
       Mar 4, 2020   ❤️ 1
    uBlock 只用来处理纯 URL 规则,CSS 交给 Stylus,JS 管理器是 Tampermonkey

    各司其职,不要试图用一个工具通吃(Adblock Plus 的隐藏 DOM 元素规则十分蹩脚)
    203x
        5
    203x  
       Mar 4, 2020   ❤️ 1
    这样:

    www.zhihu.com##input.Input::-webkit-input-placeholder:style(color: transparent !important)
    find456789
        6
    find456789  
    OP
       Mar 4, 2020
    @autoxbc 谢谢你

    @203x 谢谢你,果然可以了,这个语法好奇怪呀
    Ringokun
        7
    Ringokun  
       Apr 28, 2020
    同样的问题 最后是用的 Stylus

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

    感谢 @autoxbc
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   760 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 21:16 · PVG 05:16 · LAX 14:16 · JFK 17:16
    ♥ Do have faith in what you're doing.