Super Dark Mode Pro

أقوى سكريبت وضع ليلي ذكي - Developed by Mohamed Fares

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

You will need to install an extension such as Tampermonkey to install this script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         Super Dark Mode Pro
// @namespace    http://tampermonkey.net/
// @version      1.2
// @description  أقوى سكريبت وضع ليلي ذكي - Developed by Mohamed Fares
// @author       Mohamed Fares
// @match        *://*/*
// @grant        none
// @run-at       document-start
// ==/UserScript==

(function() {
    'use strict';

    const css = `
        html {
            filter: invert(1) hue-rotate(180deg) !important;
            background-color: #000 !important;
        }
        /* استثناء الصور والفيديوهات عشان ألوانهم متتقلبش */
        img, video, canvas, iframe, [style*="background-image"] {
            filter: invert(1) hue-rotate(180deg) !important;
        }
    `;

    const style = document.createElement('style');
    style.type = 'text/css';
    if (style.styleSheet) {
        style.styleSheet.cssText = css;
    } else {
        style.appendChild(document.createTextNode(css));
    }

    // إضافة الستايل في أسرع وقت ممكن
    (document.head || document.documentElement).appendChild(style);
})();