diff options
author | New Tobin Paradigm <email@mattatobin.com> | 2018-04-08 19:48:59 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-08 19:48:59 -0400 |
commit | 7156604f1c5866a7f0929a9bd0b3f8f1fc9b5eb9 (patch) | |
tree | 7b2c15619feb8659a6ece52c3d61b56fe3a55e0e /devtools/client/shared | |
parent | be78355e8374c566488e1004e3f3c41785dd3dd0 (diff) | |
parent | 9a94a94cfff33c7f91614f31a546e47b4c3229ac (diff) | |
download | UXP-7156604f1c5866a7f0929a9bd0b3f8f1fc9b5eb9.tar UXP-7156604f1c5866a7f0929a9bd0b3f8f1fc9b5eb9.tar.gz UXP-7156604f1c5866a7f0929a9bd0b3f8f1fc9b5eb9.tar.lz UXP-7156604f1c5866a7f0929a9bd0b3f8f1fc9b5eb9.tar.xz UXP-7156604f1c5866a7f0929a9bd0b3f8f1fc9b5eb9.zip |
Merge pull request #109 from janekptacijarabaci/devtools_appmenu_2
[PALEMOON] [DevTools] Added support of the appmenu for DevTools menuitems (follow up)
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"); |