diff --git a/application/palemoon/base/content/browser-appmenu.inc b/application/palemoon/base/content/browser-appmenu.inc index 4869afa113..cfc855484a 100644 --- a/application/palemoon/base/content/browser-appmenu.inc +++ b/application/palemoon/base/content/browser-appmenu.inc @@ -144,10 +144,10 @@ observes="workOfflineMenuitemState" oncommand="BrowserOffline.toggleOfflineStatus();"/> - + diff --git a/application/palemoon/base/content/browser-menubar.inc b/application/palemoon/base/content/browser-menubar.inc index e947e7d793..fc6bc76943 100644 --- a/application/palemoon/base/content/browser-menubar.inc +++ b/application/palemoon/base/content/browser-menubar.inc @@ -534,12 +534,12 @@ label="&webDeveloperMenu.label;" accesskey="&webDeveloperMenu.accesskey;"> - + Web Developer + let menu = doc.getElementById("menuWebDeveloperPopup"); + // Insert the Devtools Menu Items before everything else + menu.insertBefore(menuItems, menu.firstChild); + // Move the devtools last seperator and Get More Tools menu items to the bottom + let menu_endSeparator = doc.getElementById("menu_devToolsEndSeparator"); + let menu_getMoreDevtools = doc.getElementById("menu_getMoreDevtools"); + menu.insertBefore(menu_getMoreDevtools, null); + menu.insertBefore(menu_endSeparator, menu_getMoreDevtools); + + // Application Menu > Web Developer (If existant) let appmenu = doc.getElementById("appmenu_webDeveloper_popup"); if (appmenu) { - appmenu.appendChild(appmenuItems); - - // There is still "Page Source" menuitem hardcoded into browser.xul. Instead - // of manually inserting everything around it, move it to the expected - // position. - let appmenu_pageSource = doc.getElementById("appmenu_pageSource"); + // Insert the Devtools Menu Items after the hardcoded idless seperator + appmenu.insertBefore(appmenuItems, appmenu.childNodes[2].nextSibling); + // Move the devtools last seperator and Get More Tools menu items to the bottom let appmenu_endSeparator = doc.getElementById("appmenu_devToolsEndSeparator"); - appmenu.insertBefore(appmenu_pageSource, appmenu_endSeparator); + let appmenu_getMoreDevtools = doc.getElementById("appmenu_getMoreDevtools"); + appmenu.insertBefore(appmenu_getMoreDevtools, null); + appmenu.insertBefore(appmenu_endSeparator, appmenu_getMoreDevtools); } - - let menu = doc.getElementById("menuWebDeveloperPopup"); - menu.appendChild(menuItems); - - // There is still "Page Source" menuitem hardcoded into browser.xul. Instead - // of manually inserting everything around it, move it to the expected - // position. - let menu_pageSource = doc.getElementById("menu_pageSource"); - let menu_endSeparator = doc.getElementById("menu_devToolsEndSeparator"); - menu.insertBefore(menu_pageSource, menu_endSeparator); } /**