aboutsummaryrefslogtreecommitdiff
path: root/misc/old-reddit-page-cleanup.js
diff options
context:
space:
mode:
authorTim Keller <tjkeller.xyz>2024-11-17 22:36:53 -0600
committerTim Keller <tjkeller.xyz>2024-11-17 22:36:53 -0600
commit6bb49cc16cbf03d4e0980c2343372ff20d0a4b55 (patch)
tree38b659a6081e639cce5bd4503886370a75c5c770 /misc/old-reddit-page-cleanup.js
parentd7484069764fe74654fe5e7721919462bc1286d2 (diff)
downloaduserscripts-6bb49cc16cbf03d4e0980c2343372ff20d0a4b55.tar.xz
userscripts-6bb49cc16cbf03d4e0980c2343372ff20d0a4b55.zip
rename all scripts to have .user.js ext
Diffstat (limited to 'misc/old-reddit-page-cleanup.js')
-rw-r--r--misc/old-reddit-page-cleanup.js33
1 files changed, 0 insertions, 33 deletions
diff --git a/misc/old-reddit-page-cleanup.js b/misc/old-reddit-page-cleanup.js
deleted file mode 100644
index ab4007a..0000000
--- a/misc/old-reddit-page-cleanup.js
+++ /dev/null
@@ -1,33 +0,0 @@
-// ==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)
-})