From 8a3f8fda4be693d2b792a7df48cba6f252a48ed7 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Wed, 14 Aug 2013 22:24:00 +1000 Subject: [PATCH] Don't complete shadowy sidebar figures. --- pentadactyl/content/config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pentadactyl/content/config.js b/pentadactyl/content/config.js index 1d22bf8f..2dde4bc1 100644 --- a/pentadactyl/content/config.js +++ b/pentadactyl/content/config.js @@ -221,7 +221,8 @@ var Config = Module("config", ConfigBase, { completion.sidebar = function sidebar(context) { let menu = document.getElementById("viewSidebarMenu"); context.title = ["Sidebar Panel"]; - context.completions = Array.map(menu.childNodes, function (n) [n.getAttribute("label"), ""]); + context.completions = Array.filter(menu.childNodes, function (n) n.hasAttribute("label")) + .map(function (n) [n.getAttribute("label"), ""]); }; }, events: function initEvents(dactyl, modules, window) {