1
0
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:
Kris Maglione
2009-06-28 14:46:23 -04:00
parent 55164325df
commit 7c7710b23d
2 changed files with 7 additions and 4 deletions

View File

@@ -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)
{

View File

@@ -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;