mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 23:27:59 +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
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user