From 9691c026d8108ec130bba21b55fdb5226a77ad1c Mon Sep 17 00:00:00 2001 From: bunglegrind Date: Sat, 2 Oct 2021 12:54:17 +0200 Subject: [PATCH] Update extractHtml.js changed let to const --- web-extension/extractHtml.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web-extension/extractHtml.js b/web-extension/extractHtml.js index 8f0cd19..2503c25 100644 --- a/web-extension/extractHtml.js +++ b/web-extension/extractHtml.js @@ -126,17 +126,17 @@ function extractIFrames() { return "#" + id + " " + line.replace("body", ""); }).join("\n"); } - let iframes = Array.from(document.querySelectorAll("iframe")); + const iframes = Array.from(document.querySelectorAll("iframe")); const divs = iframes.map(function (iframe, index) { const div = document.createElement("div"); div.id = "save-as-ebook-iframe-" + index; if (!iframe.contentDocument || !iframe.contentDocument.body) { return div; } - let bbox = iframe.getBoundingClientRect(); + const bbox = iframe.getBoundingClientRect(); div.style.width = bbox.width; div.style.height = bbox.height; - div.innerHTML = iframe.contentDocument.body.innerHTML ?? ""; + div.innerHTML = iframe.contentDocument.body.innerHTML; Array.from(div.querySelectorAll("style")).forEach(function (style) { style.innerHTML = editStyle(style.innerHTML, div.id); });