mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 23:08: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
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue