Làm thế nào để nối bối cảnh khách hàng-menuitem vào tư thế cuối cùng trong firefox?


1

Tôi đang chạy trên Ubuntu 12.04.
Tôi đi theo này hướng dẫn thêm Quitđể firefox's nhấp chuột phải menu ngữ cảnh.
Firebugcũng thêm một bối cảnh-menuitem ( Inspect Element with Firebug) vào cuối cùng.
Kết quả không như tôi mong muốn.


Lệnh này cho tôi kết quả trống:

grep -r 'Inspect Element with Firebug' .

Vì vậy, tôi không biết làm thế nào để firebugtạo ra menuitem.
Nhưng tôi có thể chỉnh sửa ~/.mozilla/firefox/*.default/chrome/userChrome.cssđể ẩn nó:

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

Tôi đã làm gì:

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

Những gì tôi nhận được:

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

Những gì tôi muốn:

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

Câu trả lời:


1
  1. giải nén ~/.mozilla/firefox/*.default/extensions/firebug@software.joehewitt.com.xpi
  2. chỉnh sửa firebug/content/firebug/firefox/browserMenuOverlay.xul
  3. zip và thay thế

nguyên

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

sửa đổi

<!-- 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>
Khi sử dụng trang web của chúng tôi, bạn xác nhận rằng bạn đã đọc và hiểu Chính sách cookie và Chính sách bảo mật của chúng tôi.
Licensed under cc by-sa 3.0 with attribution required.