Only wrap iframes that don't specify their own height

This commit is contained in:
Nate Weaver 2020-02-28 08:17:28 -06:00
parent 65b508ffaa
commit e183a5406c
1 changed files with 3 additions and 0 deletions

View File

@ -333,6 +333,9 @@ private extension ArticleRenderer {
var init = {
wrapFrames: function () {
document.querySelectorAll("iframe").forEach(element => {
if (element.height > 0 || parseInt(element.style.height) > 0)
return;
var wrapper = document.createElement("div");
wrapper.classList.add("iframeWrap");
element.parentNode.insertBefore(wrapper, element);