find456789
V2EX  ›  问与答

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

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

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

    image.png

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



    @matrix67

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

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

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

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

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

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