From 353d0ffad7c1810d2c5a87d73f6649bcbc55aad4 Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Sun, 5 Feb 2023 03:21:30 +0100 Subject: feat: add plugin to customize css for individual websites... and how to enable it. Also tweak README.mds --- plugins/style/style.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 plugins/style/style.js (limited to 'plugins/style/style.js') diff --git a/plugins/style/style.js b/plugins/style/style.js new file mode 100644 index 0000000..01524d0 --- /dev/null +++ b/plugins/style/style.js @@ -0,0 +1,26 @@ +// Replicates the Stylus app: + +if (document.domain == "forum.effectivealtruism.org"){ + var styles = ` + .Layout-main { + margin-left: 100px; + } + .SingleColumnSection-root { + width: 1000px !important; + max-width: 1400px !important; + padding-left: 100px !important; + } + .NavigationStandalone-sidebar { + display: none; + } + .intercom-lightweight-app{ + display: none; + } + ` + var styleSheet = document.createElement('style') + styleSheet.innerText = styles + document.head.appendChild(styleSheet) + console.log('Style changed') +} + +document.body.style.visibility = "visible" -- cgit v1.2.3