1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-06 16:04:12 +01:00

Fix toggling the same.

This commit is contained in:
Kris Maglione
2011-01-02 22:30:48 -05:00
parent 20906772ce
commit edb444640c
2 changed files with 7 additions and 3 deletions

View File

@@ -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");
},