mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 15:58:39 +09:00
[PALEMOON] [DevTools] Added support of the appmenu for DevTools menuitems (follow up)
Issue #96 Issue #102
This commit is contained in:
parent
f0d4b2476b
commit
c166a0abd4
3 changed files with 87 additions and 20 deletions
|
|
@ -133,10 +133,11 @@ function attachKeybindingsToBrowser(doc, keys) {
|
|||
*/
|
||||
function createToolMenuElements(toolDefinition, doc) {
|
||||
let id = toolDefinition.id;
|
||||
let appmenuId = "appmenuitem_" + id;
|
||||
let menuId = "menuitem_" + id;
|
||||
|
||||
// Prevent multiple entries for the same tool.
|
||||
if (doc.getElementById(menuId)) {
|
||||
if (doc.getElementById(appmenuId) || doc.getElementById(menuId)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -321,6 +322,7 @@ function addTopLevelItems(doc) {
|
|||
doc,
|
||||
id: "app" + id,
|
||||
label: l10n(l10nKey + ".label"),
|
||||
accesskey: null,
|
||||
isCheckbox: item.checkbox
|
||||
});
|
||||
let menuitem = createMenuItem({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue