From 6bb49cc16cbf03d4e0980c2343372ff20d0a4b55 Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Sun, 17 Nov 2024 22:36:53 -0600 Subject: rename all scripts to have .user.js ext --- misc/old-reddit-page-cleanup.user.js | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 misc/old-reddit-page-cleanup.user.js (limited to 'misc/old-reddit-page-cleanup.user.js') diff --git a/misc/old-reddit-page-cleanup.user.js b/misc/old-reddit-page-cleanup.user.js new file mode 100644 index 0000000..ab4007a --- /dev/null +++ b/misc/old-reddit-page-cleanup.user.js @@ -0,0 +1,33 @@ +// ==UserScript== +// @name old.reddit.com page cleanup +// @namespace Violentmonkey Scripts +// @match https://old.reddit.com/* +// @grant none +// @version 1.0 +// @author tjkeller.xyz +// @description 10/20/2024, 7:22:44 PM +// ==/UserScript== + +/* remove top welcome banner */ +document.querySelector("section").remove() + +/* remove login prompt above comments */ +document.querySelector("section").remove() + +/* remove user sidebar */ +document.body.parentElement.style.paddingRight = 0 +document.getElementById("header-bottom-right").remove() + +/* remove most of the sidebar */ +const sidebar = document.querySelector("div.side") +console.log(sidebar) +sidebar.style.float = "none" +sidebar.style.margin = "25px" +while (sidebar.children[1]) + sidebar.children[1].remove() + +/* wrap code in pre instead of p */ +document.querySelectorAll("code").forEach(c => { + const pre = c.parentElement.parentElement.insertBefore(document.createElement("pre"), c.parentElement) + pre.appendChild(c) +}) -- cgit v1.2.3