From af23cedd7d175b8e63a235ce8094ae18019635c5 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Fri, 19 Jun 2009 00:23:51 +1000 Subject: [PATCH] Test title attributes when searching for a relationship link. --- common/content/buffer.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/content/buffer.js b/common/content/buffer.js index 63321fbb..3c265d89 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -1176,13 +1176,16 @@ function Buffer() //{{{ return true; } + // TODO: this should probably use the default 'hinttags' value. --djk let res = buffer.evaluateXPath(options["hinttags"], frame.document); for (let [,regex] in Iterator(regexps)) { for (let i in util.range(res.snapshotLength, 0, -1)) { let elem = res.snapshotItem(i); - if (regex.test(elem.textContent) || Array.some(elem.childNodes, function (child) regex.test(child.alt))) + if (regex.test(elem.textContent) || + regex.test(elem.title) || + Array.some(elem.childNodes, function (child) regex.test(child.alt))) { buffer.followLink(elem, liberator.CURRENT_TAB); return true;