diff --git a/common/content/hints.js b/common/content/hints.js index dd9f542f..c0556708 100644 --- a/common/content/hints.js +++ b/common/content/hints.js @@ -764,10 +764,12 @@ function Hints() //{{{ // TODO: document class='lk', what is it? --djk const DEFAULT_HINTTAGS = - ["input[not(@type='hidden')]", "a", "area", "iframe", "textarea", "button", "select"].reduce( - function (path, node) Array.concat(path, node, "xhtml:" + node), - "*[@onclick or @onmouseover or @onmousedown or @onmouseup or @oncommand or @class='lk' or @role='link']" - ).map(function (node) "//" + node).join(" | "); + util.Array(["input[not(@type='hidden')]", "a", "area", "iframe", "textarea", "button", "select"]).map( + function (spec) [spec, "xhtml:" + spec]).flatten() + .concat( + "*[@onclick or @onmouseover or @onmousedown or @onmouseup or @oncommand or @class='lk' or @role='link']") + .map(function (node) "//" + node) + .join(" | "); function checkXPath(val) { diff --git a/common/content/util.js b/common/content/util.js index fc47a72a..94d9fd3c 100644 --- a/common/content/util.js +++ b/common/content/util.js @@ -716,6 +716,7 @@ util.Array = function Array_(ary) { return util.Array(res); return res; }, + concat: function() Array.concat.apply(this.__proto__, arguments), map: function() this.__noSuchMethod__("map", Array.slice(arguments)), }; return obj;