Super Dark Mode Pro

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

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==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);
})();