How can I remove items from right-click context menu?
-
- Posts: 331
- Joined: March 28th, 2004, 3:51 am
- Morlock
- Posts: 191
- Joined: July 28th, 2003, 8:02 am
I have a couple of stubborn items in my context menu that I can't get rid of.
In the link context-menu:
Open Link in New Tab
Save Link to Disk
Here's what I have in my userChrome.css file:
/* =============== Context Menu Options Removal */
/* To show item place /* in front of it (see below) */
/* =============== Remove Items In Context Menu: WEB PAGE */
#context-back, /* "Back" */
#context-forward, /* "Forward" */
#context-reload, /* "Reload" */
#context-stop, /* "Stop" */
#context-sep-stop, /* Separator Below "Stop" */
#context-bookmarkpage, /* "Bookmark This Page..." */
#context-savepage, /* "Save Page As..." */
#context-sendpage, /* "Send Page..." */
/* =============== Remove Items In Context Menu: LINKS */
/* Open Link in New Window */
#context-openlink, /* "Open Link in New Window" */
#context-openlinkintab, /* "Open Link in New Tab" */
#context-sep-open, /* Separator Below "Open Link in New..." */
#context-bookmarklink, /* "Bookmark This Link..." */
#context-savelink, /* "Save Link to Disk..." */
#context-sendlink, /* "Send Link..." */
/* #context-copylink, /* "Copy Link Location" */
/* #context-copyemail, /* "Copy Email Address" */
/* #context-sep-copylink, /* Separator Below Link Items */
/* =============== Remove Items In Context Menu: IMAGES */
#context-viewimage, /* "View Image" */
/* #context-copyimage, /* "Copy Image Location" */
#context-copyimage-contents, /* "Copy Image to Clipboard" */
#context-sep-copyimage, /* Separator Below "Copy Image location" */
/* #context-saveimage, /* "Save Image As..." */
#context-sendimage, /* "Send Image..." */
#context-setWallpaper, /* "Set As Wallpaper" */
#context-blockimage, /* "Block Images from this Server" */
#context-sep-viewbgimage, /* Separator Above "View Background Image" */
#context-viewbgimage, /* "View Background Image" */
/* =============== Remove Items In Context Menu: TEXT */
/* #context-undo, /* "Undo" */
/* #context-sep-undo, /* Separator Below "Undo" */
/* #context-cut, /* "Cut" */
/* #context-copy, /* "Copy" */
/* #context-paste, /* "Paste" */
#context-delete, /* "Delete" */
/* #context-sep-paste, /* "Separator Below "Delete" */
/* #context-selectall, /* "Select All" */
#context-sep-selectall, /* "Separator Below "Select All" */
#context-searchselect, /* "Web Search for..." */
/* #context-viewpartialsource-selection, /* "View Selection Source" */
/* =============== Remove Items In Context Menu: EXTRA */
#frame-sep, /* Separator Above "This Frame" */
/* #frame, /* "This Frame" */
#context-viewpartialsource-mathml, /* "View MathML Source" */
#context-sep-properties, /* Separator Above Properties Items */
#context-viewsource, /* "View Page Source" */
#context-viewinfo, /* "View Page Info" */
#context-metadata /* "Properties" */
{ display: none; !important; }
/* =============== Remove Items In Context Menu: BOOKMARKS */
#bookmarks-context-menu menuitem[label="Expand"],
#bookmarks-context-menu menuitem[label="Open"],
#bookmarks-context-menu menuitem[label="Open in Tabs"],
/* #bookmarks-context-menu menuitem[label="Manage Folder"] + menuseparator, */
#bookmarks-context-menu menuitem[label="New Folder..."] + menuseparator,
#bookmarks-context-menu menuitem[label="Open in New Window"],
#bookmarks-context-menu menuitem[label="Open in New Tab"],
#bookmarks-context-menu menuitem[label="Open in New Tab"] + menuseparator,
#bookmarks-context-menu menuitem[label="Cut"],
#bookmarks-context-menu menuitem[label="Copy"],
#bookmarks-context-menu menuitem[label="Paste"],
#bookmarks-context-menu menuitem[label="Paste"] + menuseparator
{ display: none; }
/* =============== End Context Menu Options Removal */
In the link context-menu:
Open Link in New Tab
Save Link to Disk
Here's what I have in my userChrome.css file:
/* =============== Context Menu Options Removal */
/* To show item place /* in front of it (see below) */
/* =============== Remove Items In Context Menu: WEB PAGE */
#context-back, /* "Back" */
#context-forward, /* "Forward" */
#context-reload, /* "Reload" */
#context-stop, /* "Stop" */
#context-sep-stop, /* Separator Below "Stop" */
#context-bookmarkpage, /* "Bookmark This Page..." */
#context-savepage, /* "Save Page As..." */
#context-sendpage, /* "Send Page..." */
/* =============== Remove Items In Context Menu: LINKS */
/* Open Link in New Window */
#context-openlink, /* "Open Link in New Window" */
#context-openlinkintab, /* "Open Link in New Tab" */
#context-sep-open, /* Separator Below "Open Link in New..." */
#context-bookmarklink, /* "Bookmark This Link..." */
#context-savelink, /* "Save Link to Disk..." */
#context-sendlink, /* "Send Link..." */
/* #context-copylink, /* "Copy Link Location" */
/* #context-copyemail, /* "Copy Email Address" */
/* #context-sep-copylink, /* Separator Below Link Items */
/* =============== Remove Items In Context Menu: IMAGES */
#context-viewimage, /* "View Image" */
/* #context-copyimage, /* "Copy Image Location" */
#context-copyimage-contents, /* "Copy Image to Clipboard" */
#context-sep-copyimage, /* Separator Below "Copy Image location" */
/* #context-saveimage, /* "Save Image As..." */
#context-sendimage, /* "Send Image..." */
#context-setWallpaper, /* "Set As Wallpaper" */
#context-blockimage, /* "Block Images from this Server" */
#context-sep-viewbgimage, /* Separator Above "View Background Image" */
#context-viewbgimage, /* "View Background Image" */
/* =============== Remove Items In Context Menu: TEXT */
/* #context-undo, /* "Undo" */
/* #context-sep-undo, /* Separator Below "Undo" */
/* #context-cut, /* "Cut" */
/* #context-copy, /* "Copy" */
/* #context-paste, /* "Paste" */
#context-delete, /* "Delete" */
/* #context-sep-paste, /* "Separator Below "Delete" */
/* #context-selectall, /* "Select All" */
#context-sep-selectall, /* "Separator Below "Select All" */
#context-searchselect, /* "Web Search for..." */
/* #context-viewpartialsource-selection, /* "View Selection Source" */
/* =============== Remove Items In Context Menu: EXTRA */
#frame-sep, /* Separator Above "This Frame" */
/* #frame, /* "This Frame" */
#context-viewpartialsource-mathml, /* "View MathML Source" */
#context-sep-properties, /* Separator Above Properties Items */
#context-viewsource, /* "View Page Source" */
#context-viewinfo, /* "View Page Info" */
#context-metadata /* "Properties" */
{ display: none; !important; }
/* =============== Remove Items In Context Menu: BOOKMARKS */
#bookmarks-context-menu menuitem[label="Expand"],
#bookmarks-context-menu menuitem[label="Open"],
#bookmarks-context-menu menuitem[label="Open in Tabs"],
/* #bookmarks-context-menu menuitem[label="Manage Folder"] + menuseparator, */
#bookmarks-context-menu menuitem[label="New Folder..."] + menuseparator,
#bookmarks-context-menu menuitem[label="Open in New Window"],
#bookmarks-context-menu menuitem[label="Open in New Tab"],
#bookmarks-context-menu menuitem[label="Open in New Tab"] + menuseparator,
#bookmarks-context-menu menuitem[label="Cut"],
#bookmarks-context-menu menuitem[label="Copy"],
#bookmarks-context-menu menuitem[label="Paste"],
#bookmarks-context-menu menuitem[label="Paste"] + menuseparator
{ display: none; }
/* =============== End Context Menu Options Removal */
- soccer_dude182
- Posts: 720
- Joined: July 11th, 2003, 10:50 pm
- Location: Waco, TX
Whoa, with all that, it's hard to imagine you still have a context menu
Anyway, this is what I have in my userchrome.css to remove open link in new tab (which is basically the same as yours) and it works fine with me. I'm not sure why it's not working with you though...
/* Open Link in New Tab */
#context-openlinkintab
{ display: none !important; }
Anyway, this is what I have in my userchrome.css to remove open link in new tab (which is basically the same as yours) and it works fine with me. I'm not sure why it's not working with you though...
/* Open Link in New Tab */
#context-openlinkintab
{ display: none !important; }
- nexx
- Posts: 736
- Joined: July 29th, 2003, 1:23 am
- Location: Brisbane, Australia
- Contact:
This list is old an there are some items missing which i never filled in, but i hope this helps:
<a href="http://users.bigpond.net.au/nexx1/oxpmenu/" title="Office XP Menus">Office XP Menus</a> || <a href="http://scragz.com/tech/mozilla/firefox-unofficial-branding.php"> Unofficial Firefox Branding</a>
- mai9
- Posts: 1619
- Joined: January 15th, 2003, 3:41 pm
- Location: Barcelona
- Contact:
the "This frame" menus and separator are:
#frame-sep, /* Separator Above "This Frame" */
/* #frame, /* "This Frame" */
that image also lacks "context-sep-paste"
http://lxr.mozilla.org/mozilla/source/b ... er.js#2954
#frame-sep, /* Separator Above "This Frame" */
/* #frame, /* "This Frame" */
that image also lacks "context-sep-paste"
http://lxr.mozilla.org/mozilla/source/b ... er.js#2954
-
- Posts: 2
- Joined: May 8th, 2004, 6:10 am
here's my userChrome.css
#context-back,
#context-bookmarklink,
#context-bookmarkpage,
#context-forward,
#context-openlinkintab,
#context-openlink,
#context-reload,
#context-savepage,
#context-selectall,
#context-stop,
#context-setWallpaper,
#context-viewbgimage,
#context-viewimage,
#context-viewinfo,
#context-viewsource,
#context-sendpage,
#context-sendlink,
#context-sendimage,
#context-savelink,
#context-sep-open,
#context-sep-copylink,
#context-sep-stop,
#context-sep-properties,
#context-sep-viewbgimage,
#context-blockimage,
#frame-sep
{
display: none !important;
}
#context-bookmarklink,
#context-bookmarkpage,
#context-forward,
#context-openlinkintab,
#context-openlink,
#context-reload,
#context-savepage,
#context-selectall,
#context-stop,
#context-setWallpaper,
#context-viewbgimage,
#context-viewimage,
#context-viewinfo,
#context-viewsource,
#context-sendpage,
#context-sendlink,
#context-sendimage,
#context-savelink,
#context-sep-open,
#context-sep-copylink,
#context-sep-stop,
#context-sep-properties,
#context-sep-viewbgimage,
#context-blockimage,
#frame-sep
{
display: none !important;
}
- thenightfly42
- Posts: 983
- Joined: November 5th, 2002, 8:03 am
- mai9
- Posts: 1619
- Joined: January 15th, 2003, 3:41 pm
- Location: Barcelona
- Contact:
- mai9
- Posts: 1619
- Joined: January 15th, 2003, 3:41 pm
- Location: Barcelona
- Contact:
-
- Posts: 333
- Joined: November 16th, 2003, 9:19 pm
- Location: Fairfield, CT USA
ezervoud,
No, you can't use the same method to add items. This method to remove items basically tells the browser to hide the menu items. The functionality is still there, just hidden. In order to add items to a menu, it has to be coded for somewhere, either in an extension or in the core of the browser itself.
No, you can't use the same method to add items. This method to remove items basically tells the browser to hide the menu items. The functionality is still there, just hidden. In order to add items to a menu, it has to be coded for somewhere, either in an extension or in the core of the browser itself.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061222 BonEcho/2.0.0.1 (tete009 SSE PGO)