MozillaZine

How can I remove items from right-click context menu?

Discussion of features in Mozilla Firefox
Ashamanic
 
Posts: 331
Joined: March 28th, 2004, 3:51 am

Post Posted April 29th, 2004, 1:10 pm

I just tried some of that and my bookmarks folders on the toolbar dissapeared along with th chrome edit icon. Anyone know what I should do to get them back? I removed the changes I made
Found it. They had been moved back to the bookamarks toolbar and were only visible there when I was customizing

Luftpost
 
Posts: 460
Joined: October 11th, 2003, 7:54 am

Post Posted April 30th, 2004, 6:52 am

Is this in the FAQ tips and tricks. Should be if it isn't.

Morlock

User avatar
 
Posts: 191
Joined: July 28th, 2003, 8:02 am

Post Posted May 6th, 2004, 3:00 pm

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 */

soccer_dude182

User avatar
 
Posts: 720
Joined: July 11th, 2003, 10:50 pm
Location: Waco, TX

Post Posted May 6th, 2004, 9:16 pm

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; }

nexx

User avatar
 
Posts: 736
Joined: July 29th, 2003, 1:23 am
Location: Brisbane, Australia

Post Posted May 6th, 2004, 11:14 pm

This list is old an there are some items missing which i never filled in, but i hope this helps:

Image
<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

User avatar
 
Posts: 1619
Joined: January 15th, 2003, 3:41 pm
Location: Barcelona

Post Posted May 7th, 2004, 12:32 pm

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

AesirKoki
 
Posts: 2
Joined: May 8th, 2004, 6:10 am

Post Posted May 8th, 2004, 6:40 am

#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;
}

thenightfly42

User avatar
 
Posts: 983
Joined: November 5th, 2002, 8:03 am

Post Posted May 12th, 2004, 9:16 am

Thanks for everyone's help above. It took me a while, but I finally got it working properly.

There's a new context menu item, "Print...", to remove it use:
#context-printpage

mdinaz
 
Posts: 7
Joined: May 21st, 2004, 3:24 pm
Location: Arizona

Post Posted May 21st, 2004, 3:48 pm

None of these changes are working for me - perhaps my userChrome.css file is in the wrong directory. What is the
proper directory for this file to be in?

thanks

mc

mai9

User avatar
 
Posts: 1619
Joined: January 15th, 2003, 3:41 pm
Location: Barcelona

Post Posted May 21st, 2004, 8:03 pm

the practical way is this extension:

http://extensionroom.mozdev.org/more-info/chromedit

mdinaz
 
Posts: 7
Joined: May 21st, 2004, 3:24 pm
Location: Arizona

Post Posted May 21st, 2004, 9:26 pm

That worked out great - thanks!

mc

mai9

User avatar
 
Posts: 1619
Joined: January 15th, 2003, 3:41 pm
Location: Barcelona

Post Posted May 23rd, 2004, 2:29 am

\:D/

ezervoud

User avatar
 
Posts: 261
Joined: November 5th, 2003, 2:17 am
Location: Athens

Post Posted May 24th, 2004, 1:55 am

Can we use the same method to add an item to the context menu?
What I'm looking at is to add "Character encoding" on my right-click options

TIA

plien69
 
Posts: 333
Joined: November 16th, 2003, 9:19 pm
Location: Fairfield, CT USA

Post Posted May 24th, 2004, 7:15 am

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.
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)

ezervoud

User avatar
 
Posts: 261
Joined: November 5th, 2003, 2:17 am
Location: Athens

Post Posted May 24th, 2004, 7:52 am

Thanks plien69!

Return to Firefox Features


Who is online

Users browsing this forum: patrickjdempsey and 1 guest