隐藏 Firefox 各处右键菜单中的多余项

Firefox 中的很多菜单项目都是平时用不上的, 比如很少有人会在页面上点右键,再选择后退、打印之类的操作吧?再装些扩展,那右键臃肿得不能看了。所以下面我介绍的是如何隐藏页面、书签等地方的右键菜单项目,可以根据自己需要选择性地隐藏它们。

下面的代码格式都是

需要隐藏的项目A,
需要隐藏的项目B,
需要隐藏的项目C
{ display: none !important; }

注意项目之间用半角逗号分隔,最后一个项目后面没有逗号。花括号里的是隐藏命令,!important 表示优先级。下面列出的可隐藏的项目看名字都是一目了然,我就不多解释了。
另外,#context-sep-stop 表示页面右键菜单“停止”下方的分割线,如果你把它上方的东西都隐藏了,当然应该把分割线也一并拿掉。类似的还有书签右键菜单中的 menuseparator。
编辑好需要隐藏的项目之后,把命令添加到 Firefox 的配置目录下这个文件中:

%appdata%\Mozilla\Firefox\Profiles\
xxxxxxxx.default\chrome\userChrome.css

如果没有这个文件就新建一个,默认状态下那里会有一个文件叫 userChrome-example.css ,用它另存也行。

隐藏页面右键菜单项:

#context-back,
#context-forward,
#context-reload,
#context-stop,
#context-sep-stop,
#context-bookmarkpage,
#context-savepage,
#context-sendpage,
#context-sep-viewbgimage,
#context-openlink,
#context-sep-open,
#context-bookmarklink,
#context-sendlink,
#context-sep-copyimage,
#context-sendimage,
#context-setWallpaper,
#context-printpage,
#context-smartsearch
{ display: none !important; }

隐藏书签菜单项:

menuitem[label="Bookmark This Page..."],
menuitem[label="Bookmark All Tabs..."],
menuitem[label="Organize Bookmarks..."],
menuitem[label="Organize Bookmarks..."] + menuseparator,
menu[label="Bookmarks Toolbar Folder"]
{ display: none !important; }

隐藏书签项的右键菜单项:

#bookmarks-context-menu menuitem[label="New Bookmark..."],
#bookmarks-context-menu menuitem[label="New Folder..."],
#bookmarks-context-menu menuitem[label="Sort By Name"],
#bookmarks-context-menu menuitem[label="Sort By Name"] + menuseparator,
#bookmarks-context-menu menuitem[label="Open All in Tabs"],
#bookmarks-context-menu menuitem[label="Open All in Tabs"] + menuseparator,
#bookmarks-context-menu menuitem[label="Open"],
#bookmarks-context-menu menuitem[label="Open in New Tab"],
#bookmarks-context-menu menuitem[label="Open in New Tab"] + menuseparator,
#bookmarks-context-menu menuitem[label="New Separator"],
#bookmarks-context-menu menuitem[label="New Separator"] + menuseparator,
#bookmarks-context-menu menuitem[label="Cut"],
#bookmarks-context-menu menuitem[label="Paste"],
#bookmarks-context-menu menuitem[label="Paste"] + menuseparator,
#bookmarks-toolbox #main-menubar
{ display: none !important; }

隐藏书签栏下拉最后的"open in tabs"

.openintabs-menuseparator, .openintabs-menuitem
{ display: none !important; }

隐藏工具栏上的下拉箭头,比如前进后退旁边的:

.toolbarbutton-menubutton-dropmarker
{ display: none !important; }

最新评论

  • motif motif.md 晒一晒我用过的博客页眉
  • Shawna Kenyon Are you looking for powerful advertising that delivers real results? I apologize for sending you this message on your contact form but actually that was the whole point. We can send your ad copy to sites via their contact pages just like you're receiving this note right now. You can specify targets by keyword or just execute mass blasts to sites in the location of your choice. So let's say you're looking to push through an ad to all the mortgage brokers in the US, we'll scrape websites for just those and post your ad message to them. Providing you're advertising some kind of offer that's relevant to that type of business then you'll be blessed with an amazing response! Shoot me a reply to ethan3646hug@gmail.com for the details Greasemonkey 脚本推荐:在任何填邮箱的地方自动提示 Gmail 联系人
  • cheap jordan shoes I wish to show my gratitude for your generosity in support of people that should have help on this area. Your special commitment to getting the message all over had become incredibly good and has frequently allowed people much like me to achieve their targets. This useful useful information signifies this much to me and much more to my mates. Thank you; from all of us. Google 嵌入式日历重大更新
  • Fredericka McGuirk Need to find effective online promotion that isn't completely full of it? I apologize for sending you this message on your contact form but actually that was kinda the point. We can send your ad text to sites through their contact pages just like you're receiving this message right now. You can target by keyword or just start bulk blasts to websites in any country you choose. So let's say you want to push through an ad to all the contractors in the United States, we'll scrape websites for only those and post your ad message to them. As long as you're advertising a product or service that's relevant to that business category then your business will get awesome results! Write a quick note to evie2535gre@gmail.com to get info and prices Greasemonkey 脚本推荐:在任何填邮箱的地方自动提示 Gmail 联系人
  • 心灵博客 当年有这个效果已经很不错哦 diy 山寨投影家庭影院

发表您的评论

您的评论将回复给 原评论者

:D:):O8):(8D;DXD:P:nice::rainbow::cafe::love::cake:

目前有 15 条评论

  

前段时间刚用这个文件改了,FF界面的默认字体,这个文件还是挺灵活的

肥硕也是个FX的发烧友?


fisio 回复: 呵呵,用两年了,小有研究,献丑罗~

用过FF后IE根本就不想看了.


fisio 回复: 同,留着IE6做测试用,IE7是没什么兴趣了

赞~
我也一直用,但是从来没动过隐藏其菜单的念头:)
不过还是很实用,万一哪天我用着了呢:)

用这个插件就可以完全隐藏菜单了,和IE7一样的效果。http://forum.moztw.org/viewtopic.php?t=15303


fisio 回复: 这篇主要说的是隐藏右键菜单项目,之后我也另发文详细对比过隐藏菜单栏的扩展哦!

非常感谢这篇文章 一直在找 呵呵

右键菜单中其他那些plugin加入的项目怎么隐藏呢?
不知道他的ID啊


fisio 回复: 其实语言、版本不同的 Firefox 在项目 id 上有些区别,除非你有开发日志...呵呵

这里有一个问题,我的FF是2。0以上的。
相对于menuitem[label="Bookmark This Page..."],

这样的隐藏是失效的,我的是用的优化的firefox,但是 隐藏页面右键菜单项:
是正常的。
所以想请教一下,楼主是否碰到过此类问题。


fisio 回复: 自从 Firefox 2 之后我也不知道很多菜单项目的 id 了...

就是找hidemenu这样的东西来的。

哈哈

我在苹果的系统中找不到这个文件.
另外,苹果的系统中'自动填入表格'的内容怎么删除?

OSX 下位置当然不一样,不过用 spotlight 搜一下应该能找到的配置文件夹所在的

隐藏

设为桌面背景…

id应该为

context-setDesktopBackground

你的代码是旧版的?更正下。

这的确非常老了,好像还是 firefox 1.5 的了吧…

呵呵,没注意看日期,晕。


有 1 篇其他博客的文章引用了本文

  1. 08年10月23日不是出家人 » Blog Archive » Firefox 美化教程(三)隐藏菜单栏 shanshuise.site88.net/?p=129