Gmail Dark Theme

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

当前为 2021-05-24 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==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