diff options
| author | Tim Keller <tjk@tjkeller.xyz> | 2026-09-21 23:18:15 -0500 |
|---|---|---|
| committer | Tim Keller <tjk@tjkeller.xyz> | 2026-09-21 23:18:15 -0500 |
| commit | b88ff9fe8e80cc4d8aa0db2a3595ab10f40f4439 (patch) | |
| tree | 234e442aaaff83d1a50fb15998690dc4f0bfe6c6 /scripts/old-reddit-page-cleanup.user.js | |
| parent | 531a76993e2babcecc69be7b5333729078c8dd9b (diff) | |
| download | userscripts-b88ff9fe8e80cc4d8aa0db2a3595ab10f40f4439.tar.xz userscripts-b88ff9fe8e80cc4d8aa0db2a3595ab10f40f4439.zip | |
move all scripts to scripts dir
Diffstat (limited to 'scripts/old-reddit-page-cleanup.user.js')
| -rw-r--r-- | scripts/old-reddit-page-cleanup.user.js | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/scripts/old-reddit-page-cleanup.user.js b/scripts/old-reddit-page-cleanup.user.js new file mode 100644 index 0000000..70905ab --- /dev/null +++ b/scripts/old-reddit-page-cleanup.user.js @@ -0,0 +1,35 @@ +// ==UserScript== +// @name old.reddit.com page cleanup +// @namespace Violentmonkey Scripts +// @match https://old.reddit.com/* +// @grant none +// @homepageURL https://git.tjkeller.xyz/userscripts/about +// @downloadURL https://git.tjkeller.xyz/userscripts/plain/scripts/old-reddit-page-cleanup.user.js +// @version 1.1 +// @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) +}) |
