Pure Black Background

Apply a pure black background to any website

目前为 2024-09-07 提交的版本。查看 最新版本

// ==UserScript==
// @name         Pure Black Background
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Apply a pure black background to any website
// @author       Patrick Gomes
// @match        *://*/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Apply pure black background to all elements
    const css = `
        html, body, div, span, applet, object, iframe,
        h1, h2, h3, h4, h5, h6, p, blockquote, pre,
        a, abbr, acronym, address, big, cite, code,
        del, dfn, em, img, ins, kbd, q, s, samp,
        small, strike, strong, sub, sup, tt, var,
        b, u, i, center, dl, dt, dd, ol, ul, li,
        fieldset, form, label, legend, table, caption,
        tbody, tfoot, thead, tr, th, td, article,
        aside, canvas, details, embed, figure,
        figcaption, footer, header, hgroup, menu,
        nav, output, ruby, section, summary, time,
        mark, audio, video {
            background-color: #000000 !important;
            color: #FFFFFF !important; /* Optional: to ensure text is visible */
        }
    `;
    const style = document.createElement('style');
    style.type = 'text/css';
    style.appendChild(document.createTextNode(css));
    document.head.appendChild(style);
})();