Skip to content

Commit

Permalink
Update extractHtml.js
Browse files Browse the repository at this point in the history
changed let to const
  • Loading branch information
bunglegrind authored Oct 2, 2021
1 parent 2b8edd0 commit 9691c02
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions web-extension/extractHtml.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down

0 comments on commit 9691c02

Please sign in to comment.