Google Docs Dark Theme

Make Google Docs a bit darker

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         Google Docs Dark Theme
// @namespace    googleDarkTheme
// @version      0.3
// @description  Make Google Docs a bit darker
// @author       JetDave
// @match        https://docs.google.com/document/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    document.body.style.filter = "invert(0.9)";
    window.addEventListener("DOMNodeInserted",invertImgs);
    window.addEventListener("load",invertImgs)
    // kix-embeddedobject-image
    function invertImgs(){
        var elms = document.getElementsByTagName("img");
        for(let elm of elms){
            elm.style.filter = "invert(1)";
        }
        var elms2 = document.getElementsByClassName("kix-spelling-error-overlay");
        for(let elm of elms2){
            elm.style.filter = "invert(1)";
        }
        var elms3 = document.getElementsByClassName("kix-embeddedobject-image");
        for(let elm of elms3){
            elm.style.filter = "invert(1)";
        }
        var elms4 = document.getElementsByClassName("link-bubble-thumbnail-image");
        for(let elm of elms4){
            elm.style.filter = "invert(1)";
        }
    }
})();