Tweaks for SCPs

This commit is contained in:
Marcus Noble 2020-06-27 18:08:33 +01:00
parent 253a21e378
commit 9a03fc2182
1 changed files with 23 additions and 4 deletions

View File

@ -159,7 +159,7 @@ async function sendPage(website, tries = 0) {
} }
blockquote { blockquote {
margin: 10px 2px; margin: 10px 2px;
line-height: 2em; line-height: 1.5em;
border: 0; border: 0;
border-left: 8px solid grey; border-left: 8px solid grey;
padding-left: 8px; padding-left: 8px;
@ -220,7 +220,9 @@ async function sendPage(website, tries = 0) {
.translation_block, .translation_block,
#u-author_block, #u-author_block,
.u-faq, .u-faq,
.info-container { .info-container,
.diamond-part,
[class*='licensebox'] {
display: none !important; display: none !important;
} }
.collapsible-block-unfolded { .collapsible-block-unfolded {
@ -231,6 +233,19 @@ async function sendPage(website, tries = 0) {
max-width: 80% !important; max-width: 80% !important;
font-size: 10pt; font-size: 10pt;
} }
.anom-bar-container a:after {
content: "" !important;
}
.disrupt-class:before,
.disrupt-class:after,
.risk-class:before,
.risk-class:after,
.anom-bar-container .main-class:before,
.anom-bar-container .main-class:after {
display: none !important;
content: "" !important;
border: none !important;
}
`}); `});
@ -245,7 +260,7 @@ async function sendPage(website, tries = 0) {
// Remove medium blur images // Remove medium blur images
[...document.querySelectorAll('img[src^="https://miro.medium.com/max/60/"]')].forEach(node => node.style.display = "none") [...document.querySelectorAll('img[src^="https://miro.medium.com/max/60/"]')].forEach(node => node.style.display = "none")
if (window.location.hostname === "scp-wiki.wikidot.com") { if (window.location.hostname.includes("scp-wiki")) {
if (document.querySelector('.collapsible-block-unfolded')) { if (document.querySelector('.collapsible-block-unfolded')) {
document.querySelector('.collapsible-block-unfolded').style.display = "block"; document.querySelector('.collapsible-block-unfolded').style.display = "block";
} }
@ -296,7 +311,11 @@ async function sendPage(website, tries = 0) {
const myPDF = await page.pdf({ format: 'A4', margin: {top: 40, bottom: 40, left: 40, right: 40} }); const myPDF = await page.pdf({ format: 'A4', margin: {top: 40, bottom: 40, left: 40, right: 40} });
console.log("Saved to PDF") console.log("Saved to PDF")
await sendToRemarkable(title, myPDF); if (process.env.DEBUG == "true") {
fs.writeFileSync(title+'.pdf', myPDF);
} else {
await sendToRemarkable(title, myPDF);
}
return true; return true;
} catch (ex) { } catch (ex) {