diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-08 21:55:44 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-08 21:55:44 +0200 |
commit | 9a94a94cfff33c7f91614f31a546e47b4c3229ac (patch) | |
tree | e0121b49c4d2936ec9defc7fb8b1d0faf2f71fe0 /devtools/client/shared | |
parent | 2e7c6320a8baed64edfc7576cabfcdbf8ee155d3 (diff) | |
download | UXP-9a94a94cfff33c7f91614f31a546e47b4c3229ac.tar UXP-9a94a94cfff33c7f91614f31a546e47b4c3229ac.tar.gz UXP-9a94a94cfff33c7f91614f31a546e47b4c3229ac.tar.lz UXP-9a94a94cfff33c7f91614f31a546e47b4c3229ac.tar.xz UXP-9a94a94cfff33c7f91614f31a546e47b4c3229ac.zip |
[PALEMOON] [DevTools] Added support of the appmenu for DevTools menuitems (follow up)
Issue #96
Issue #102
Diffstat (limited to 'devtools/client/shared')
-rw-r--r-- | devtools/client/shared/developer-toolbar.js | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/devtools/client/shared/developer-toolbar.js b/devtools/client/shared/developer-toolbar.js index 2528591a6..d84402418 100644 --- a/devtools/client/shared/developer-toolbar.js +++ b/devtools/client/shared/developer-toolbar.js @@ -449,7 +449,15 @@ DeveloperToolbar.prototype.show = function (focus) { [ this.tooltipPanel, this.outputPanel ] = panels; - this._doc.getElementById("menu_devToolbar").setAttribute("checked", "true"); + let checkboxValue = "true"; + let appmenuEl = this._doc.getElementById("appmenu_devToolbar"); + let menuEl = this._doc.getElementById("menu_devToolbar"); + if (appmenuEl) { + appmenuEl.setAttribute("checked", checkboxValue); + } + if (menuEl) { + menuEl.setAttribute("checked", checkboxValue); + } this.target = TargetFactory.forTab(this._chromeWindow.gBrowser.selectedTab); const options = { @@ -569,7 +577,15 @@ DeveloperToolbar.prototype.hide = function () { Services.prefs.setBoolPref("devtools.toolbar.visible", false); - this._doc.getElementById("menu_devToolbar").setAttribute("checked", "false"); + let checkboxValue = "false"; + let appmenuEl = this._doc.getElementById("appmenu_devToolbar"); + let menuEl = this._doc.getElementById("menu_devToolbar"); + if (appmenuEl) { + appmenuEl.setAttribute("checked", checkboxValue); + } + if (menuEl) { + menuEl.setAttribute("checked", checkboxValue); + } this.destroy(); this._telemetry.toolClosed("developertoolbar"); |