Gmail Dark Theme

Dark theme for Gmail. Changing default dark theme, some backround colors and adding some borders

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        Gmail Dark Theme
// @version     1.0.1
// @date        2020-05-03
// @author      Getsumi3
// @description Dark theme for Gmail. Changing default dark theme, some backround colors and adding some borders
// @match       *://mail.google.com/*
// @grant       none
// @run-at      document-start
// @license     MIT
// @copyright 2020, Getsumi3 (https://https://github.com/Getsumi3)
// @namespace https://greasyfork.org/users/549792
// ==/UserScript==

function addGlobalStyle(css) {
  var head, style;
  head = document.getElementsByTagName('head')[0];
  if (!head) {
    return;
  }
  style = document.createElement('style');
  style.type = 'text/css';
  style.innerHTML = css;
  head.appendChild(style);
}

//making the loading screen dark! so your eyes will not burn while gmail is loading
addGlobalStyle('#loading { background-color: #111111; }');
addGlobalStyle('#bhlf { color: rgba(255,255,255,0.70); }');

//adding some space between inbox categories and e-mails, and removing the bg color
addGlobalStyle('.aKh { padding-bottom: 10px; background-color: inherit !important; }');

//changing border for each inbox category
addGlobalStyle('.aIf-aLe { border-right: 2px solid #ff9800 !important; }');
addGlobalStyle('.aKe-aLe { border-right: 3px solid #2196F3 !important; }');
addGlobalStyle('.aJi-aLe { border-right: 3px solid #74b973 !important; }');

//pretifying hover for inbox categories
addGlobalStyle('.aRz.J-KU:hover { background: rgb(255,255,255) !important; background: linear-gradient(45deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.25) 100%) !important; }');

//changing bg-color for unread e-mails,adding left border to mark unread e-mails
addGlobalStyle('.zE { background-color: #191a1f !important; border-left: 3px solid #ff9800; margin-bottom: 5px;}');

//changing bg-color for read e-mails,adding left border to mark read e-mails
addGlobalStyle('.yO { background-color: #111111 !important; border-left: 3px solid #2196F3; margin-bottom: 5px;}');

//TODO: Changing colors for message itself