//document.querySelector(".mercury-send-to-kindle-button").remove(); var article = document.querySelector("article") document.querySelectorAll("span.inserted").forEach((e) => e.remove()); var title = article.querySelector("h1"); var subtitle = article.querySelector("h2"); var metadata = article.querySelectorAll("h6.text-secondary"); var images = article.querySelector(".content-main-image").querySelectorAll("img.article-slideshow-image"); var content = article.querySelector(".node-body"); images.forEach((e) => e.style.height = "100%"); images.forEach((e) => e.classList.remove("w-100")); document.documentElement.removeAttribute("class"); document.documentElement.removeAttribute("lang"); document.documentElement.removeAttribute("dir"); document.body.removeAttribute("class"); document.body.removeAttribute("style"); var header = document.createElement("header"); var imageContainer = document.createElement("div"); var footer = document.createElement("header"); document.designMode = "on"; document.body.innerHTML = ""; document.body.appendChild(header); header.appendChild(title); header.appendChild(subtitle); metadata.forEach((e) => header.append(e)); document.body.appendChild(document.createElement("hr")); document.body.appendChild(imageContainer); images.forEach((e) => imageContainer.append(e)); document.body.appendChild(content); document.body.appendChild(document.createElement("hr")); document.body.appendChild(footer); footer.appendChild(document.createTextNode(location.href)); imageContainer.style.display = "flex"; imageContainer.style.height = "200px"; imageContainer.style.justifyContent = "space-evenly"; document.head.innerHTML = ` ${title.textContent.trim()} `;