From 32185a7ceb013af6d33b7b8fb48430efaa58181a Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Sun, 7 Jun 2020 17:08:19 +0100 Subject: [PATCH] Better handling of SCP titles --- index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 840355f..c1894bb 100644 --- a/index.js +++ b/index.js @@ -238,7 +238,10 @@ async function sendPage(website, tries = 0) { if (document.querySelector('.collapsible-block-unfolded')) { document.querySelector('.collapsible-block-unfolded').style.display = "block"; } - document.body.innerHTML = document.getElementById('page-content').innerHTML; + if (document.querySelector('.page-rate-widget-box')) { + document.querySelector('.page-rate-widget-box').style.display = "none"; + } + document.body.innerHTML = `

${document.getElementById('page-title').innerHTML}

` + document.getElementById('page-content').innerHTML; } else if (isProbablyReaderable(document.cloneNode(true))) { var documentClone = document.cloneNode(true); var article = new Readability(documentClone).parse();