home go links go books go opinion go gallery go projects go resumé go
about this site
archives
book reviews
"to read" list
tech books
search books
books archive
last 10 posts
quotes
cluetrain
cluetrain (mirrored)
randobracket
image auth
search engine hits
  hit history
indexer stats
user agent list
HTML (view)
  (most up-to-date)
MS Word (dl)
code examples
doesntsuck.com
doesntsuck.com

October 26, 2005

how to edit mozilla context menus   (geekin, link)

http://forums.mozillazine.org/viewtopic.php?t=14776
I hate the "Close Other Tabs" item in context menus when you right click on a tab in Mozilla. It finally pissed me off enough (because I click it accidentally sometimes when I'm just trying to close one tab) to figure out how to remove it.

my userChrome.css:
menuitem[label="Close Other Tabs"] { display: none; }

other stuff you could put in userChrome.css (you probably don't want to delete everything...):

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

Posted by yargevad at October 26, 2005 12:31 PM


This weblog is licensed under a Creative Commons License.