Skip to content

Commit dee19ce

Browse files
committed
Tools submenu for seamonkey
Although this (1) goes in mysterious the Tools->Web Development menu for some reason, and this code is deeply inelegant.
1 parent 32baf58 commit dee19ce

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/chrome/content/toolbar_button.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ function stitch_context_menu() {
4141
menu.appendChild(popup.cloneNode(true));
4242
}
4343
}
44+
function stitch_context_menu2() {
45+
// the same menu appears both under Tools and via the toolbar button:
46+
var menu = document.getElementById("https-everywhere-menu2");
47+
if (!menu.firstChild) {
48+
var popup = document.getElementById("https-everywhere-context");
49+
menu.appendChild(popup.cloneNode(true));
50+
}
51+
}
4452

4553
function show_applicable_list(menupopup) {
4654
var domWin = content.document.defaultView.top;

src/chrome/content/toolbar_button.xul

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
</menu>
1717
</menupopup>
1818

19+
<menupopup id="toolsPopup" onpopupshowing="stitch_context_menu2()">
20+
<menu id="https-everywhere-menu2" label="&https-everywhere.about.ext_name;">
21+
<!-- "https-everywhere-context" below gets .cloneNode()ed in here -->
22+
</menu>
23+
</menupopup>
24+
1925
<toolbarpalette id="BrowserToolbarPalette">
2026
<toolbarbutton
2127
id="https-everywhere-button"

0 commit comments

Comments
 (0)