MozillaZine

removing things in context menus

Discussion of general topics about Mozilla Firefox
mai9

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

Post Posted July 1st, 2003, 7:22 pm

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

clav
 
Posts: 1974
Joined: November 5th, 2002, 3:25 am
Location: Lancaster, UK

Post Posted July 1st, 2003, 7:52 pm

in the same order:

#context-copyimage,
#context-savepage,
#context-viewimage,
#context-openlinkintab,
#context-back,
#context-forward,
#context-reload,
#context-stop,
#context-bookmarkpage,
#context-blockimage,
#context-viewbgimage {
display: none;
}

My Yute
 
Posts: 895
Joined: June 5th, 2003, 1:19 am
Location: Kingston, Jamaica

Post Posted July 1st, 2003, 8:09 pm

I'm assuming this goes in the userContent.css file?

scragz

User avatar
 
Posts: 2914
Joined: February 8th, 2003, 2:38 am
Location: San Diego, US

Post Posted July 1st, 2003, 8:55 pm

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

User avatar
 
Posts: 9100
Joined: November 5th, 2002, 4:43 pm
Location: Anywhere but here

Post Posted July 1st, 2003, 10:31 pm

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

mai9

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

Post Posted July 2nd, 2003, 11:58 am

GREAT!

Thank you very much

Paradox52525

User avatar
 
Posts: 1219
Joined: April 23rd, 2003, 9:13 am
Location: Middle of nowhere

Post Posted July 2nd, 2003, 12:00 pm

What about the Print and Print Preview items on the context menu? Is there a way to get rid of those?

scragz

User avatar
 
Posts: 2914
Joined: February 8th, 2003, 2:38 am
Location: San Diego, US

Post Posted July 2nd, 2003, 12:22 pm

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.

clav
 
Posts: 1974
Joined: November 5th, 2002, 3:25 am
Location: Lancaster, UK

Post Posted July 2nd, 2003, 12:48 pm

Paradox52525 wrote:What about the Print and Print Preview items on the context menu? Is there a way to get rid of those?

the ones on the context menu are Trivial's fault. try:

#trivP, #trivP + menuitem { display:none !important; }

jmccrary
 
Posts: 61
Joined: March 14th, 2003, 5:20 pm

Post Posted July 4th, 2003, 5:22 am

I have been trying to remove the separators in the bookmark dropdown menu - the one at the top and the one above the "Open in Tabs" item in the folders. Can anyone help?

mai9

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

Post Posted July 4th, 2003, 7:09 am

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.

Paradox52525

User avatar
 
Posts: 1219
Joined: April 23rd, 2003, 9:13 am
Location: Middle of nowhere

Post Posted July 4th, 2003, 11:33 am

Thanks for the replay clav, but that doesn't seem to work. That line is also for userchrome right?

Old Bozz
 
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post Posted November 5th, 2003, 8:57 am

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

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

Post Posted November 5th, 2003, 6:53 pm

wow! thanks!

there are lots of things there :)

mai9

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

Post Posted November 12th, 2003, 4:28 am

momokatte told me how to remove the 'open in tabs' and the separator found in bookmarks menu:

/* Hide last item "Open in Tabs" in bookmarks menu */
#openintabs-menuseparator,
#openintabs-menuitem { display: none !important; }

Return to Firefox General


Who is online

Users browsing this forum: No registered users and 4 guests