From d5b42bf459545d4b73933a4b0be5306c3a3189c6 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sun, 13 Oct 2019 17:02:57 +0200 Subject: extract-links: Do not depend on document.body MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #25. Root frame does not actually display a page. Can’t reproduce this issue with a simple test case unfortunately. --- crocoite/data/extract-links.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crocoite') diff --git a/crocoite/data/extract-links.js b/crocoite/data/extract-links.js index f3176da..5a4f9f0 100644 --- a/crocoite/data/extract-links.js +++ b/crocoite/data/extract-links.js @@ -27,7 +27,7 @@ function isClickable (o) { let ret = []; ['a[href]', 'area[href]'].forEach (function (s) { - let x = document.body.querySelectorAll(s); + let x = document.querySelectorAll(s); for (let i=0; i < x.length; i++) { if (isClickable (x[i])) { ret.push (x[i].href); -- cgit v1.2.3