From 22200fc2821f322a611c659d9e8611dd9e12658c Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Thu, 19 Feb 2009 23:41:32 +1100 Subject: [PATCH] Remove some duplication from buffer.followDocumentRelationship. --- common/content/buffer.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/common/content/buffer.js b/common/content/buffer.js index 3226a575..7f535692 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -1079,13 +1079,7 @@ function Buffer() //{{{ for (let i in util.range(res.snapshotLength, 0, -1)) { let elem = res.snapshotItem(i); - if (regex.test(elem.textContent)) - { - buffer.followLink(elem, liberator.CURRENT_TAB); - return true; - } - // images with alt text being href - if (Array.some(elem.childNodes, function (child) regex.test(child.alt))) + if (regex.test(elem.textContent) || Array.some(elem.childNodes, function (child) regex.test(child.alt))) { buffer.followLink(elem, liberator.CURRENT_TAB); return true;