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