mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-06 13:34:13 +01:00
Fix toggling the same.
This commit is contained in:
@@ -64,7 +64,7 @@ var ConfigBase = Class("ConfigBase", {
|
|||||||
<broadcaster id={"pentadactyl-" + id + "Sidebar"}
|
<broadcaster id={"pentadactyl-" + id + "Sidebar"}
|
||||||
autoCheck="false" type="checkbox" group="sidebar"
|
autoCheck="false" type="checkbox" group="sidebar"
|
||||||
sidebartitle={name} sidebarurl={uri}
|
sidebartitle={name} sidebarurl={uri}
|
||||||
oncommand="toggleSidebar(this.observes);" xmlns={XUL}/>
|
oncommand="toggleSidebar(this.id || this.observes);" xmlns={XUL}/>
|
||||||
}
|
}
|
||||||
|
|
||||||
util.overlayWindow(window, { append: append.elements() });
|
util.overlayWindow(window, { append: append.elements() });
|
||||||
|
|||||||
@@ -213,8 +213,12 @@ var Config = Module("config", ConfigBase, {
|
|||||||
let menu = document.getElementById("viewSidebarMenu");
|
let menu = document.getElementById("viewSidebarMenu");
|
||||||
|
|
||||||
for (let [, panel] in Iterator(menu.childNodes))
|
for (let [, panel] in Iterator(menu.childNodes))
|
||||||
if (compare(panel.label, args[0]))
|
if (compare(panel.getAttribute("label"), args[0])) {
|
||||||
return panel.doCommand();
|
let elem = document.getElementById(panel.observes);
|
||||||
|
if (elem)
|
||||||
|
elem.doCommand();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
return dactyl.echoerr("No sidebar " + args[0] + " found");
|
return dactyl.echoerr("No sidebar " + args[0] + " found");
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user