Home » Hacking, How to Recipies, Internet Browser

Tweaking: Edit Firefox Context Menu

23 February 2010 5 Comments

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\<Windows login/user name>\Application Data\Mozilla\Firefox\Profiles\<profile folder>

For Windows Vista and Seven Users:

C:\Users\<Windows login/user name>\AppData\Roaming\Mozilla\Firefox\Profiles\<profile folder>

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

We offer complete cisco certification training, iseb certification materials and study guides for microsoft certification to help you certified on time!

You Might Also Like:

5 Comments »

  • Nandan said:

    Graet job dude

    [Reply]

  • Ramkumar said:

    This is strange isnt it, Firefox holds up name like userChrome.css, Sir is its related to the Personas you are using, or default to everyone?
    Ramkumar´s last blog ..Software to find number of RSS subscribers My ComLuv Profile

    [Reply]

    Mad Geek Reply:

    @ RamKumar: It depend on the profile if you haven’t created any profile than this effect can be seen by all i.e. default for everyone

    [Reply]

  • Suhasini said:

    Hey this is really nice but needs lot of effort to do. very nice experiment and article by you.

    [Reply]

  • Mad Geek (author) said:

    Thanks @All. I am glad that you all liked it

    [Reply]

What's in your Mind!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

beingPC is Do Follow and your comments surely becomes quality and solid backlinks !

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.

CommentLuv Enabled

Get Adobe Flash playerPlugin by wpburn.com wordpress themes