diff --git a/common/modules/config.jsm b/common/modules/config.jsm index f7e52dff..d87315eb 100644 --- a/common/modules/config.jsm +++ b/common/modules/config.jsm @@ -64,7 +64,7 @@ var ConfigBase = Class("ConfigBase", { + oncommand="toggleSidebar(this.id || this.observes);" xmlns={XUL}/> } util.overlayWindow(window, { append: append.elements() }); diff --git a/pentadactyl/content/config.js b/pentadactyl/content/config.js index 131cebca..bfa17ed4 100644 --- a/pentadactyl/content/config.js +++ b/pentadactyl/content/config.js @@ -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"); },