removing things in context menus
- mai9
- Posts: 1619
- Joined: January 15th, 2003, 3:41 pm
- Location: Barcelona
- Contact:
removing things in context menus
I want to remove from context menu "Copy image location" "Save Page As..." "View Image" "Open Link in New Tab" "Back, Forward, Reload, Stop" "Bookmark This Page..." "view background image" "Block Images From this Server"
As you see I want to remove lots of things I need space for what extensions add.
Anybody can help? Thanks
As you see I want to remove lots of things I need space for what extensions add.
Anybody can help? Thanks
-
- Posts: 1974
- Joined: November 5th, 2002, 3:25 am
- Location: Lancaster, UK
- Contact:
-
- Posts: 2914
- Joined: February 8th, 2003, 2:38 am
- Location: San Diego, US
- Contact:
It goes into userChrome.css. Here are some more:
Code: Select all
/* ----------------------------- Context Menu ------------------------------ */
/* --------------------------------- Link ---------------------------- */
/* Open Link in New Window */
#context-openlink {
}
/* Open Link in New Tab */
#context-openlinkintab {
}
/* separator below the "Open Link in ..." items */
#context-sep-open {
}
/* Bookmark This Link... */
#context-bookmarklink {
}
/* Save Link As... */
#context-savelink {
}
/* Copy Email Address */
#context-copyemail {
}
/* Copy Link Location */
#context-copylink {
}
/* separator below the items related to links */
#context-sep-copylink {
}
/* ------------------------------- End Link ---------------------------- */
/* ----------------------------- Images ------------------------------ */
/* View Image */
#context-viewimage {
}
/* Copy Image Location */
#context-copyimage {
}
/* separator below the Copy Image Location item */
#context-sep-copyimage {
}
/* Save Image As... */
#context-saveimage {
}
/* Set As Wallpaper */
#context-setWallpaper {
display: none !important;
}
/* Block Images from this Server */
#context-blockimage {
display: none !important;
}
/* -------------------------- End Images ------------------------------ */
/* --------------------------- Web Page---------------------------- */
/* Back */
#context-back {
}
/* Forward */
#context-forward {
display: none !important;
}
/* Reload */
#context-reload {
}
/* Stop */
#context-stop {
display: none !important;
}
/* separator below the Stop item */
#context-sep-stop {
display: none !important;
}
/* Bookmark This Page... */
#context-bookmarkpage {
display: none !important;
}
/* Save Page As... */
#context-savepage {
display: none !important;
}
/* View Background Image */
#context-viewbgimage {
display: none !important;
}
/* separator above the View Background Image link */
#context-sep-viewbgimage {
display: none !important;
}
/* ------------------------- End Web Page---------------------------- */
/* -------------------------- Text Box---------------------------- */
/* Undo */
#context-undo {
}
/* separator below the Undo item */
#context-sep-undo {
}
/* Cut */
#context-cut {
}
/* Copy */
#context-copy {
}
/* Paste */
#context-paste {
}
/* Delete */
#context-delete {
}
/* separator below the Delete item, even if the name contains "paste" */
#context-sep-paste {
}
/* Select All */
#context-selectall {
}
/* separator below the Select All item */
#context-sep-selectall {
}
/* ------------------------- End Text Box---------------------------- */
/* Web Search for "foo", if "foo" is selected */
#context-searchselect {
}
/* separator above the This Frame sub-menu */
frame-sep {
}
/* Unfortunately, the Frame sub-menu items don't have ids, so you can't select them individually.
You should be able to select the whole sub-menu with menu[id="frame"] or #frame. */
/* separator above the items related to the page properties: source, infos, & properties */
#context-sep-properties {
}
/* View Selection Source */
#context-viewpartialsource-selection {
}
/* View MathML Source */
#context-viewpartialsource-mathml {
}
/* View Page Source */
#context-viewsource {
}
/* View Page Info */
#context-viewinfo {
}
/* Properties */
#context-metadata {
}
/* ----------------------------- End Context Menu ------------------------------ */
- alanjstr
- Moderator
- Posts: 9100
- Joined: November 5th, 2002, 4:43 pm
- Location: Anywhere but here
- Contact:
That's a great list. I'm to add it to my blog where I mentioned kiosk browsing.
Former UMO Admin, Former MozillaZine General Mod
I am rarely on mozillaZine, so please do not send me a private message.
My Old Firefox config files
I am rarely on mozillaZine, so please do not send me a private message.
My Old Firefox config files
- mai9
- Posts: 1619
- Joined: January 15th, 2003, 3:41 pm
- Location: Barcelona
- Contact:
- Paradox52525
- Posts: 1219
- Joined: April 23rd, 2003, 9:13 am
- Location: Middle of nowhere
- Contact:
-
- Posts: 2914
- Joined: February 8th, 2003, 2:38 am
- Location: San Diego, US
- Contact:
Paradox52525 wrote:What about the Print and Print Preview items on the context menu? Is there a way to get rid of those?
Do you mean in the file menu? If so:
Code: Select all
menu[label="File"] menuitem[label="Print..."]
, menu[label="File"] menuitem[label="Print Preview"] {
display: none !important;
}
edit: changed to menuitem
If not, in what context are you getting those? I don't see them anywhere.
Last edited by scragz on July 2nd, 2003, 1:02 pm, edited 1 time in total.
-
- Posts: 1974
- Joined: November 5th, 2002, 3:25 am
- Location: Lancaster, UK
- Contact:
- mai9
- Posts: 1619
- Joined: January 15th, 2003, 3:41 pm
- Location: Barcelona
- Contact:
messing...
I am having the same problem as jmccrary. I tried using the idea scragz suggested:
/* View Background Image */
#context-viewbgimage {
display: none !important;
}
/* separator above the View Background Image link */
#context-sep-viewbgimage {
display: none !important;
}
That is, adding a "-sep" but it doesn't always work. But maybe it was me who didn't apply this chrome correctly.
I think that changing context menus is a nice idea for an extension. Using chromes for it is a tedious work. And since there are different types of context menus, at the end, UserChrome.css becomes a mess.
/* View Background Image */
#context-viewbgimage {
display: none !important;
}
/* separator above the View Background Image link */
#context-sep-viewbgimage {
display: none !important;
}
That is, adding a "-sep" but it doesn't always work. But maybe it was me who didn't apply this chrome correctly.
I think that changing context menus is a nice idea for an extension. Using chromes for it is a tedious work. And since there are different types of context menus, at the end, UserChrome.css becomes a mess.
- Paradox52525
- Posts: 1219
- Joined: April 23rd, 2003, 9:13 am
- Location: Middle of nowhere
- Contact:
-
- Posts: 0
- Joined: December 31st, 1969, 5:00 pm
Re: messing...
mai9 wrote:I am having the same problem as jmccrary. I tried using the idea scragz suggested:
/* View Background Image */
#context-viewbgimage {
display: none !important;
}
/* separator above the View Background Image link */
#context-sep-viewbgimage {
display: none !important;
}
That is, adding a "-sep" but it doesn't always work. But maybe it was me who didn't apply this chrome correctly.
I think that changing context menus is a nice idea for an extension. Using chromes for it is a tedious work. And since there are different types of context menus, at the end, UserChrome.css becomes a mess.
I was going thru several old posts and consolidating for my own prefs, so if you haven't found your answers, take a look at these. The items your looking for are in there. I found that some items, like seperators, do not have id's similar to others, such as "#context-sep-viewbgimage". I've been looking for that one for sometime now and after adding the codes that I didn't already have, it was gone. I have no idea which code took it out, so I'm keeping them all.
/*Remove Right Click ContextMenu Items*/
#context-back,
#context-bookmarklink,
#context-copyemail,
#context-sep-copyimage,
#context-sep-copylink,
#context-forward,
#context-sep-open,
#context-openlink,
#context-openlinkintab,
#context-sep-paste,
#context-sep-properties,
#context-reload,
#context-savepage,
#context-sep-selectall,
#context-viewpartialsource-mathml,
#context-viewpartialsource-selection,
#context-frame-sep,
#context-stop,
#context-sep-stop,
#context-sep-undo,
#context-viewbgimage { display: none !important }
#context-showonlythisframe,
#context-viewsource,
#context-viewinfo { display: none; }
menuitem[label="Reload Frame"],
menuitem[label="Open in New Window"],
menuitem[label="Expand"],
menuitem[label="Manage Folder"],
menuitem[label="New Folder..."],
menuitem[label="Open"],
menuitem[label="Open in New Tab"],
menuitem[label="Bookmark This Frame..."],
menuitem[label="Show Only This Frame"],
menuitem[label="Save Frame As..."],
menuitem[label="View Frame Source"],
menuitem[label="View Frame Info"],
menuitem[label="Open Frame in New Window"] { display: none; }
/* Remove menu buttons */
menu[label="File"],
menu[label="Go"],
menu[label="Edit"],
menu[label="View"],
menu[label="Tools"],
menu[label="Bookmarks Toolbar Folder"],
menu[label="Help"] { display: none !important; }
/* Remove menu items */
menuitem[label="Open Link in New Tab"],
menuitem[label="New Window"],
menuitem[label="Open File..."],
menuitem[label="Close"],
menuitem[label="Close Tab"],
menuitem[label="Close Window"],
menuitem[label="Save Page As..."],
menuitem[label="Exit"],
menuitem[label="Add to Bookmarks..."],
menuitem[label="Bookmarks Toolbar"],
menuitem[label="Open in Tabs"],
menuitem[label="JavaScript Console"],
menuitem[label="Page Info"],
menuitem[label="Page Setup..."],
menuitem[label="Print Preview"],
menuitem[label="Print..."] { display: none; }
/* Removes majority of menu separators */
menuitem + menuseparator {display: none;}
/* Removes remainder of menu separators except Bookmarks Toolbars..unknown */
menu[label="Sidebar"] + menuseparator,
menu[label="Character Coding"] + menuseparator,
menu[label="Bookmarks Toolbar Folder"] + menuseparator,
menu[label="Mozilla Firebird & Mozilla Information"] + menuseparator,
menu[label="Mozilla & Phoenix Information"] + menuseparator,
menu[label="Quick Searches"] + menuseparator,
menu[label="Middle Eastern"] + menuseparator { display: none !important; }
- 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: