mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 18:47:58 +01:00
Cleanup default 'hinttags' definition a bit
This commit is contained in:
@@ -764,10 +764,12 @@ function Hints() //{{{
|
|||||||
|
|
||||||
// TODO: document class='lk', what is it? --djk
|
// TODO: document class='lk', what is it? --djk
|
||||||
const DEFAULT_HINTTAGS =
|
const DEFAULT_HINTTAGS =
|
||||||
["input[not(@type='hidden')]", "a", "area", "iframe", "textarea", "button", "select"].reduce(
|
util.Array(["input[not(@type='hidden')]", "a", "area", "iframe", "textarea", "button", "select"]).map(
|
||||||
function (path, node) Array.concat(path, node, "xhtml:" + node),
|
function (spec) [spec, "xhtml:" + spec]).flatten()
|
||||||
"*[@onclick or @onmouseover or @onmousedown or @onmouseup or @oncommand or @class='lk' or @role='link']"
|
.concat(
|
||||||
).map(function (node) "//" + node).join(" | ");
|
"*[@onclick or @onmouseover or @onmousedown or @onmouseup or @oncommand or @class='lk' or @role='link']")
|
||||||
|
.map(function (node) "//" + node)
|
||||||
|
.join(" | ");
|
||||||
|
|
||||||
function checkXPath(val)
|
function checkXPath(val)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -716,6 +716,7 @@ util.Array = function Array_(ary) {
|
|||||||
return util.Array(res);
|
return util.Array(res);
|
||||||
return res;
|
return res;
|
||||||
},
|
},
|
||||||
|
concat: function() Array.concat.apply(this.__proto__, arguments),
|
||||||
map: function() this.__noSuchMethod__("map", Array.slice(arguments)),
|
map: function() this.__noSuchMethod__("map", Array.slice(arguments)),
|
||||||
};
|
};
|
||||||
return obj;
|
return obj;
|
||||||
|
|||||||
Reference in New Issue
Block a user