Tweaking: Edit Firefox Context Menu

Feb 27, 2010

You can customize Firefox menu by using 3rd party tools but if you want to tweak menus yourself than the following tutorial is for you.
You can tweak your menus using userChrome.css file. userChrome.css is a CSS file that can be used to change the way Mozilla Firefox interface look. But to edit it you need to locate it first. 

For Windows XP users:
C:\Documents and Settings\\Application Data\Mozilla\Firefox\Profiles\
For Windows Vista and Seven Users:
C:\Users\\AppData\Roaming\Mozilla\Firefox\Profiles\

Or
  1. Press WIN + R and type %Appdata%
  2. Then navigate to Mozilla\Firefox\Profiles\lpg7v146.default\chrome
  3. Here create a file named “userChrome.css”
In this tutorial I will show you how you can Hide Menu items from the context menu.
In the userChrome.css file add a line like this to hide any menu item:
#id1, #id2 { display:none !important; }
replacing each of the identifiers #id1, #id2, … with one of the selectors from UserChrome.css IDs.
Example (hides the “View Background” menu item and the horizontal line after it):
#context-viewbgimage,
#context-sep-viewbgimage {
display: none !important;
}
So by using this method you can hide any menu item that you want, lets take one more example. Lets hide the Open Link in New Window menu item.
#context-openlink
{
display: none !important;
}
That’s it now restart your firefox and the Open Link In New Windows menu item will be gone.
Reset To Default:
If something went wrong or at some stage you want to revert back all the changes than simply delete the file userChrome.css

0 comments:

Post a Comment

 
 
 

Connect With ME