Youtube Night Mode

A Night mode for Youtube

当前为 2017-08-09 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

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

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Youtube Night Mode
// @namespace    http://tampermonkey.net/
// @version      1.07 beta
// @description  A Night mode for Youtube
// @author       MaxCoC
// @match        https://www.youtube.com/*
// @grant        none
// ==/UserScript==


//This mod can cause latency when the page has loaded
//Ce mod peut provoquer de la latence quand la page s'est chargée

//I wish you a good experience with this mod!
//If there is a problem (or questions) with this one , contact me : [email protected] 
// I can't change You Tube icon , the bell and Upload icon , if you know how contact me


// Si vous rencontrez des problèmes ou bug avec ce programme , contactez moi : [email protected]
// Je ne peux pas changer l'icone You Tube , la cloche et le bouton d'upload , si vous savez comment les changer ( de couleur ) , contactez-moi :D

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);
}

addGlobalStyle('body { background-color : #333 !important; }');
 
addGlobalStyle(' div { background-color: #333 !important; ');

addGlobalStyle("body { color : white !important; }");

addGlobalStyle('.video-list .video-list-item .title { color: white !important; } ' );

addGlobalStyle(".yt-uix-button { color: white !important; }");

addGlobalStyle('p { color: white !important ;}' );

addGlobalStyle('.yt-card { color: #333 !important; }' );

addGlobalStyle('.yt-ui-ellipsis { background-color : transparent !important; }' );

addGlobalStyle('li { color: white !important} ' );

addGlobalStyle(' h1 { color: white !important }');

addGlobalStyle('.yt-uix-button-default, .yt-uix-button-default[disabled], .yt-uix-button-default[disabled]:hover, .yt-uix-button-default[disabled]:active, .yt-uix-button-default[disabled]:focus { color: black !important }');

addGlobalStyle('.yt-uix-button-default, .yt-uix-button-default[disabled], .yt-uix-button-default[disabled]:hover, .yt-uix-button-default[disabled]:active, .yt-uix-button-default[disabled]:focus { color: white !important }');

addGlobalStyle('.yt-live-chat-header-renderer-0 {  color: white !important; }');

addGlobalStyle('.yt-live-chat-text-message-renderer-0 #message.yt-live-chat-text-message-renderer { color: white !important ; }');

addGlobalStyle('a { color: grey !important }');

addGlobalStyle('.yt-uix-button-default, .yt-uix-button-default[disabled], .yt-uix-button-default[disabled]:hover, .yt-uix-button-default[disabled]:active, .yt-uix-button-default[disabled]:focus { color: grey !important; }');

addGlobalStyle('.yt-uix-button-subscribe-branded .yt-uix-button-content, .yt-uix-button-subscribed-branded .yt-uix-button-content { color: grey !important }');

addGlobalStyle('input, textarea, select, button {color: white !important; }');

addGlobalStyle('table, tbody, td, tfoot, th, thead, tr, tt, u, ul, var { color: #E6E6E6 !important; }');

addGlobalStyle('table, tbody, td, tfoot, th, thead, tr, tt, u, ul, var  { background-color: #333 !important;}');

addGlobalStyle('.yt-uix-button-subscribe-branded .yt-uix-button-content, .yt-uix-button-subscribed-branded .yt-uix-button-content, .yt-uix-button-subscribe-unbranded .yt-uix-button-content, .yt-uix-button-subscribed-unbranded .yt-uix-button-content { color: grey !important } ');

addGlobalStyle('h2  { color: white !important } ' );

addGlobalStyle('h3 { color: #E6E6E6 !important; } ');

addGlobalStyle('.yt-uix-button yt-uix-button-size-default yt-uix-button-default yt-uix-button-empty yt-uix-button-has-icon no-icon-markup comment-action-buttons-renderer-thumb yt-uix-sessionlink sprite-comment-actions sprite-like i-a-v-sprite-like { color: black !important; } ');

addGlobalStyle('.category-header .category-title { color: #E6E6E6 !important }');

addGlobalStyle('#yt-masthead-notifications-title { color: #E6E6E6 !important }');

addGlobalStyle('.comment-renderer-text-content { color: white !important }');

addGlobalStyle('.comment-simplebox-text, .comment-simplebox-prompt { color: #E6E6E6 !important; } ');

addGlobalStyle('h4 { color: #E6E6E6 !important; } ');

addGlobalStyle('strong { color: white !important; }');

addGlobalStyle('b { color: white !important; } ');

addGlobalStyle('#comment-section-renderer .sprite-comment-actions { background-color: grey !important; } ');

addGlobalStyle('.yt-live-chat-renderer-0 yt-live-chat-header-renderer.yt-live-chat-renderer { background-color: #333 !important; } ');

addGlobalStyle('.yt-live-chat-message-input-renderer-0 { color: #333 !important; } ' );

addGlobalStyle('.yt-live-chat-text-input-field-renderer-0 #input.yt-live-chat-text-input-field-renderer { color: white !important; } ');

addGlobalStyle('.yt-live-chat-paid-message-renderer-1 #header.yt-live-chat-paid-message-renderer { color: #E6E6E6 !important; } ');

addGlobalStyle('.yt-live-chat-message-input-renderer-0 { background-color: #333 !important; } ');

addGlobalStyle('.yt-live-chat-message-input-renderer-0 #author-name.yt-live-chat-message-input-renderer { color: grey !important; } ');

addGlobalStyle('.yt-live-chat-paid-message-renderer-1 #author-name.yt-live-chat-paid-message-renderer { color: white; } ' );

addGlobalStyle('div { color: white } '); //If you see some bug contact me 

addGlobalStyle('.page-header { background-color: #333 !important; } ' );
//Press
addGlobalStyle('.connect { background-color:  #333 !important; } ');

addGlobalStyle('.page-footer { background-color: #333 !important; } ');

addGlobalStyle('.card--image-full { background-color : #333!important; } ');

//Copyright 

addGlobalStyle('.card { background-color:  #333 !important } ');

addGlobalStyle('.site-menu__inner-wrapper:before { background-color: #333 !important; } ');

//Advertise

addGlobalStyle('a.adwords-cta-banner { background-color: #333 !important;');

addGlobalStyle('#masthead-search-term input { background-color: #333 !important; ');

//Test-Version of Youtube

addGlobalStyle('ytd-button-renderer #button.ytd-button-renderer { background-color: #333 !important; } ');

addGlobalStyle('ytd-page-manager > *.ytd-page-manager { background-color: #333 !important; } ');

addGlobalStyle('#content-text.ytd-comment-renderer { color: #E6E6E6 !important; } ');

addGlobalStyle('span.yt-view-count-renderer { color: white !important; } ');

addGlobalStyle('#upnext.ytd-compact-autoplay-renderer { color: white !important; } ');

addGlobalStyle('.content.ytd-video-secondary-info-renderer { color: #E6E6E6 !important; } ');

addGlobalStyle('.count-text.ytd-comments-header-renderer { color: white !important; } ');

addGlobalStyle('#icon-label.yt-dropdown-menu { color: white !important; } ');

addGlobalStyle('#name.ytd-author-comment-badge-renderer { color: #F2F2F2 !important; }');

addGlobalStyle('#byline.ytd-video-meta-block {color: #F2F2F2 !important; }');

addGlobalStyle('#metadata-line.ytd-video-meta-block span.ytd-video-meta-block { color: #F2F2F2 !important; } ');

addGlobalStyle('yt-icon.ytd-badge-supported-renderer { color: #0080FF !important; } ');

addGlobalStyle('#container.ytd-searchbox input.ytd-searchbox { color: white !important; } ');

addGlobalStyle('.yt-live-chat-text-message-renderer-0 #author-name.yt-live-chat-text-message-renderer { color: #F2F2F2 !important; } ');

addGlobalStyle('ytd-simple-menu-header-renderer { background-color: #333 !important; } ');

addGlobalStyle('.message.ytd-notification-renderer { color: #E6E6E6 !important; } ');

addGlobalStyle('#title.ytd-shelf-renderer { color: white !important; }');

addGlobalStyle('ytd-message-renderer[shelf] #message.ytd-message-renderer { color: #F2F2F2 !important; } ');

addGlobalStyle('#channel-title.ytd-c4-tabbed-header-renderer { color: white !important; } ');

addGlobalStyle('#subscriber-count.ytd-c4-tabbed-header-renderer { color: grey !important; }');

addGlobalStyle('#subscriber-count.ytd-c4-tabbed-header-renderer { background-color: #333 !important; }');

addGlobalStyle('paper-item.ytd-account-settings { background-color: #333 !important; } ');

addGlobalStyle('a.ytd-active-account-header-renderer { background-color: #333 !important; } ');

//Upload /!\ PLEASE DISABLE THIS SCRIPT IF YOU WANT UPLOAD VIDEOS /!\

addGlobalStyle('.upload-other-options-list .upload-option-text, .upload-other-options-list .upload-option-deprecation-warning { color: white !important; } ');

addGlobalStyle('ytd-searchbox[mode=legacy] #container.ytd-searchbox input.ytd-searchbox { color: white !important; } ');

// END