3

去掉 WebQQ 和 163 邮箱中讨厌的 UI 元素

 3 years ago
source link: https://blog.lilydjwg.me/posts/17767.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

去掉 WebQQ 和 163 邮箱中讨厌的 UI 元素

本文来自依云's Blog,转载请注明。

这两天 WebQQ 的右上角又出现了红色的文字——“参与WebQQ知识问答,100Q币等你拿”。本以为过段时间它会消失的,结果到现在依然还在。

这红色的文字甚是碍眼,于是它享受了和163邮箱里的红字广告和“安全系数低”一样的待遇——被display:none了。下面是设置方法,前提当然是使用配置性强的火狐浏览器了。

首先确定 CSS 选择器。这个打开 Firebug 看吧。要写多点以免把其它网页的某些元素给选中了。也许可以指定当 URL 匹配时才匹配,但我还不会。我使用的选择器是:

#webqq_top > .top_right > .right_option > a[target=_blank]

选好后我使用 Firebug 的插件 Firefinder 确定了下正确性。毕竟我对 CSS 的高级点的选择器还不熟,没太多信心。要测试效果那可是要重启浏览器滴~

然后打开火狐的个性化配置文件<profile_dir>/chrome/userContent.css。这个 CSS 文件会应用于每个网页。(另外还有个userChrome.css文件是针对浏览器自身的。)在此文件中把那个元素隐藏起来就可以了 :-)

/*
* WebQQ 讨厌的红色调查/问答链接
*/
#webqq_top > .top_right > .right_option > a[target=_blank] {
display:none!important; /* !important 是必须的,提高该规则的优先级 */
}

在这个文件里面,还有我为屏蔽 163 邮箱里的红字而写的另外两条 CSS 规则:

/*
* 网易邮箱 3.5:不要显示“安全系数低”
*/
a#aWelcomeSecurity0 {
display:none!important;
}
/*
* 还有广告
*/
div.links > div.chl > a:last-child {
display:none!important;
}

一点题外话:继发现网易邮箱不能发送纯文本邮件后,今又确认它每次都把 Google Group 的更新邮件给我扔到垃圾邮件里,太过份了。还是 Gmail 好啊!


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK