Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm running on Ubuntu 12.04.
I followed this tutorial to add Quit to firefox's right-click context-menu.
Firebug also add a context-menuitem(Inspect Element with Firebug) to the last.
The result is not what I want.


This command give me empty result:

grep -r 'Inspect Element with Firebug' .

So I don't know how firebug create the menuitem.
But I can edit ~/.mozilla/firefox/*.default/chrome/userChrome.css to hide it:

menuitem[label="Inspect Element with Firebug"] {
    display:none;
}

What I did:

cd ~

pkill firefox

cp /usr/lib/firefox/omni.ja ~

unzip omni.ja -d omni

cd omni

find . -name 'browser.xul'

vi ./chrome/browser/content/browser/browser.xul    
    {{{
    <menupopup id="contentAreaContextMenu" ...
        <menuitem id="context-inspect" ...

        <!-- QUIT BEGIN -->
        <menuitem id="context-quit"
                      label="Quit"
                      command="cmd_quitApplication"/>
        <!-- QUIT END -->
    </menupopup>
    }}}

zip -r omni.ja *

sudo mv omni.ja /usr/lib/firefox/

firefox http://www.google.com

What I get:

| ...                          |
| View Page Info               |
|------------------------------|
| Inspect Element(Q)           |
| Quit                         |
|------------------------------|
| Inspect Element with Firebug |
+------------------------------+

What I want:

| ...                          |
| View Page Info               |
|------------------------------|
| Inspect Element(Q)           |
| Inspect Element with Firebug |
|------------------------------|
| Quit                         |
+------------------------------+
share|improve this question
add comment

1 Answer

up vote 1 down vote accepted
  1. unzip ~/.mozilla/firefox/*.default/extensions/firebug@software.joehewitt.com.xpi
  2. edit firebug/content/firebug/firefox/browserMenuOverlay.xul
  3. zip and replace

original

<!-- Firefox page context menu -->
<menupopup id="contentAreaContextMenu">
    <menuseparator/>
    <menuitem id="menu_firebugInspect" label="firebug.InspectElementWithFirebug"
              command="cmd_inspect" class="menuitem-iconic fbInternational"/>
</menupopup>

modified

<!-- Firefox page context menu -->
<menupopup id="contentAreaContextMenu">
    <menuitem id="menu_firebugInspect" label="firebug.InspectElementWithFirebug"
              command="cmd_inspect" class="menuitem-iconic fbInternational"
              insertafter="context-inspect" />
</menupopup>
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.