Coop's profile picture

Published by

published
updated

Category: Web, HTML, Tech

Userscript - CRT Scanline Remover

This is a script for spacehey that removes CRT lines from profiles, blogs, and groups.

Made this in two seconds for accessibility purposes (and so that profiles aren't super hard to read when I have my laptop plugged into my monitor.) All that you need to do is paste the below script into Tampermonkey's browser extension, enable it, and then you're good to go. (It can be turned off whenever too.)

Forgive my spaghetti code:


// ==UserScript==
// @name         CRT and Scanline Remover
// @namespace    https://blog.spacehey.com/entry?id=2005108
// @version      2025-12-03
// @description  Removes CRT scanlines from spacehey profiles, blogs, and groups.
// @author       Coop (coastergat)
// @match        https://spacehey.com/*
// @match        https://blogs.spacehey.com/*
// @match        https://groups.spacehey.com/*
// @icon         https://spacehey.com/favicon.ico
// @grant        none
// ==/UserScript==

const body = document.body;
const html = document.querySelector('html');

const beforeBody = window.getComputedStyle(body, '::before')
const beforeHtml = window.getComputedStyle(html, '::before')

const searchBody = beforeBody.getPropertyValue('background-image');
const searchHtml = beforeHtml.getPropertyValue('background-image');

if (searchBody.includes('gradient(')) {
    const replaceBody = `
     body::before {
      background: none !important;
     }
    `;

    const style = document.createElement('style');
    style.textContent = replaceBody

    document.head.appendChild(style);
}

if (searchHtml.includes('gradient(')) {
    const replaceHtml = `
     html::before {
      background: none !important;
     }
    `;

    const style = document.createElement('style');
    style.textContent = replaceHtml

    document.head.appendChild(style);
}


I'm also working on an actually cool userscript right now, so hopefully that'll be posted sooner than later. Have a nice day :)

Check out my other blogs --- Subscribe
<--
Previous

Userscript - CRT Scanline Remover

(You are here.)

-->
Next


9 Kudos

Comments

Displaying 1 of 1 comments ( View all | Add Comment )

☆∼ oyasu

☆∼ oyasu's profile picture

thank you coop for your service


Report Comment