Youtube Night Mode

A Night mode for Youtube

目前为 2017-08-11 提交的版本。查看 最新版本

// ==UserScript==
// @name         Youtube Night Mode
// @namespace    http://tampermonkey.net/
// @version      1.15 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('ytd-masthead[mode="legacy"] ytd-searchbox.ytd-masthead { background-color: #333 !important; }');

addGlobalStyle('ytd-masthead[mode="legacy"] #container.ytd-masthead { 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: #167ac6 !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 } '); 

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: #BDBDBD !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: #6E6E6E !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; } ');

addGlobalStyle('.date.ytd-video-secondary-info-renderer {color: grey !important; }');

addGlobalStyle('#metadata-line.ytd-grid-video-renderer span.ytd-grid-video-renderer { color: grey !important; } ');

addGlobalStyle('#video-title.yt-simple-endpoint.ytd-grid-video-renderer { color: #E6E6E6 !important; } ');

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

addGlobalStyle('a.yt-simple-endpoint.yt-formatted-string { color: #167ac6 !important; } ');

addGlobalStyle('.description.ytd-video-secondary-info-renderer yt-formatted-string.ytd-video-secondary-info-renderer { color: white !important;  } ');

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

addGlobalStyle('#result-count.ytd-search-sub-menu-renderer { color: white !important; }');

addGlobalStyle('#description.ytd-channel-renderer { color: #F2F2F2 !important; } ');

addGlobalStyle('#metadata.ytd-channel-renderer { color: #F2F2F2 !important; }');

addGlobalStyle('#right-column.ytd-channel-about-metadata-renderer .subheadline.ytd-channel-about-metadata-renderer { color: #E6E6E6 !important; } ');

addGlobalStyle('#right-column.ytd-channel-about-metadata-renderer > yt-formatted-string.ytd-channel-about-metadata-renderer { color: #E6E6E6 !important; }');

addGlobalStyle('#simplebox-placeholder.ytd-comment-simplebox-renderer { color: white !important; }');

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

addGlobalStyle('yt-formatted-string.ytd-report-form-renderer {color: #E6E6E6 !important;}');

addGlobalStyle('.yt-live-chat-author-badge-renderer-0 img.yt-live-chat-author-badge-renderer, .yt-live-chat-author-badge-renderer-0 yt-icon.yt-live-chat-author-badge-renderer { color: #5882FA !important; } ');

addGlobalStyle('.content-text.ytd-metadata-with-image-row-renderer:not(:first-child)  { color: #5882FA !important; } ');

addGlobalStyle('.content-text.ytd-metadata-with-image-row-renderer:first-child { color: #5882FA !important; } ');

addGlobalStyle('#share-url.yt-sharing-renderer { background-color: #333 !important; } ');

addGlobalStyle('yt-sharing-renderer {background-color: #333 !important; } ');

addGlobalStyle('#share-label.yt-sharing-renderer { color: white !important; } ');

addGlobalStyle('yt-formatted-string.yt-sharing-renderer { color: #F2F2F2 !important; }');

addGlobalStyle('#header.ytd-add-to-playlist-renderer { color: white !important; } ');

addGlobalStyle('#label.checkbox-height.ytd-playlist-add-to-option-renderer { color: #F2F2F2 !important; }' );

addGlobalStyle('#label.ytd-compact-link-renderer { color:#F2F2F2 !important; } ');

addGlobalStyle('.floated-label-placeholder.paper-input-container { color:  #F2F2F2 !important; } ');

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

addGlobalStyle('#label.ytd-privacy-dropdown-item-renderer { color: white !important } ');

addGlobalStyle('#label.ytd-privacy-dropdown-item-renderer { background-color:  #333 !important; } ');

addGlobalStyle('paper-listbox { background-color: #333 !important; } ');

addGlobalStyle('#description.ytd-privacy-dropdown-item-renderer { color: #F2F2F2 !important; } ');

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

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

addGlobalStyle('.more-button.ytd-comment-renderer, .less-button.ytd-comment-renderer { color: white !important; } ');

addGlobalStyle('ytd-app:not([style-scope]):not(.style-scope) { background-color: #333 !important; } ');

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

addGlobalStyle('yt-formatted-string.ytd-sub-feed-option-renderer { color: white !important; } ');

addGlobalStyle('.summary.ytd-comment-history-entry-renderer { color: #F2F2F2 !important; }');

addGlobalStyle('.content.ytd-comment-history-entry-renderer { color: #F2F2F2 !important; }');

addGlobalStyle('.more-button.ytd-comment-history-entry-renderer { color: white !important; } ');

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

addGlobalStyle('#stats.ytd-playlist-sidebar-primary-info-renderer { color: grey !important; } ');

addGlobalStyle('.title.ytd-mini-channel-renderer { color: #F2F2F2 !important; }');

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

addGlobalStyle('ytd-form-popup-renderer[dialog][dialog][dialog] { background-color: #333 !important; }');

addGlobalStyle('paper-input-char-counter { color: #F2F2F2 !important; } ');

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

addGlobalStyle('.index-message.ytd-playlist-panel-renderer { color: #F2F2F2 !important; } ');

addGlobalStyle('#byline.ytd-playlist-panel-video-renderer { color: grey !important; } ');

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

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

addGlobalStyle('#sections.ytd-multi-page-menu-renderer > *.ytd-multi-page-menu-renderer:not(:last-child) { background-color: #333 !important; }');

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

addGlobalStyle('#yt-masthead { background-color: #333 !important; }');

addGlobalStyle('#yt-masthead-container { background-color: #333 !important; }');

addGlobalStyle('#upload-prompt-box { background-color: #333 !important; } ');

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

addGlobalStyle('#upload-prompt-box { border: solid #E6E6E6 1px !important; }');

addGlobalStyle('#yt-masthead-notifications-header { background-color: #333 !important; }');

addGlobalStyle('#yt-masthead-notifications-content .item-section>li>.yt-lockup-tile { background-color: #333 !important; }');

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

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

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

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

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

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

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

addGlobalStyle('.howto-promo-container { background-image : #333 !important; }');

addGlobalStyle('.social-connector .info .social-network-name { background-color: #333 !important; } ');

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

addGlobalStyle('#sections.ytd-guide-renderer > *.ytd-guide-renderer:not(:last-child) {background-color : #333 !important;  }');

addGlobalStyle('.badge-style-type-live-now.ytd-badge-supported-renderer { background-color: #333 !important; }');

addGlobalStyle('paper-button  * { color: white !important; }');

addGlobalStyle('ytd-browse[page-subtype="playlist"] #alerts.ytd-browse ytd-alert-renderer.ytd-browse { background-color: #333 !important; }');

addGlobalStyle('[is=yt-endpoint] { background-color: #333 !important; } ');

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

addGlobalStyle('.yt-live-chat-item-list-renderer-1 #item-scroller.animated.yt-live-chat-item-list-renderer #items.yt-live-chat-item-list-renderer { background: #333 !important; } ');

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

addGlobalStyle('paper-button[subscribed].ytd-subscribe-button-renderer { color: white !important; }');

addGlobalStyle('yt-confirm-dialog-renderer[dialog][dialog][dialog] { background-color: #333 !important; }');

addGlobalStyle('paper-button[subscribed].ytd-subscribe-button-renderer yt-formatted-string.ytd-subscribe-button-renderer { background-color: #333 !important; }');

addGlobalStyle('paper-button[subscribed].ytd-subscribe-button-renderer {background-color: #333 !important; } ');

addGlobalStyle('paper-button[subscribed].ytd-subscribe-button-renderer { border: solid white 1px !important; }');

addGlobalStyle('paper-button * {color: #F2F2F2 !important; }');

addGlobalStyle('.content.ytd-metadata-row-renderer {color: white !important; } ');

addGlobalStyle('paper-button.yt-next-continuation { background-color: #333 !important; }');

addGlobalStyle('paper-button.yt-next-continuation { border: solid white 1px !important; } ');

addGlobalStyle('ytd-masthead[mode="legacy"] #container.ytd-masthead { background-color: #6E6E6E !important; }');

addGlobalStyle('ytd-masthead[mode="legacy"] ytd-searchbox.ytd-masthead { background-color: #6E6E6E !important; }' );

//ANALYTICS

addGlobalStyle('.C2KYWWB-H-g .C2KYWWB-H-d.C2KYWWB-H-e { background-color: #333 !important; } ');

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

addGlobalStyle('.C2KYWWB-b-k button { background: #333 !important; } ');

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

addGlobalStyle('.C2KYWWB-s-f .C2KYWWB-s-p { background-color: #333 !important; }');

addGlobalStyle('.C2KYWWB-s-f .C2KYWWB-s-i { background-color: #333 !important; } ');

addGlobalStyle('.C2KYWWB-s-f { background: #333 !important; } ');

addGlobalStyle('.C2KYWWB-g-f { background: #333 !important; }');

addGlobalStyle('.C2KYWWB-N-n { background: #333 !important;  }');

addGlobalStyle('.C2KYWWB-M-b h3 { background: #333 !important; } ');

addGlobalStyle('.C2KYWWB-F-j { background: #333 !important; } ');

addGlobalStyle('.C2KYWWB-a-a { background: #333 !important; } ');

addGlobalStyle('.C2KYWWB-lb-d { color: white !important; } ');

addGlobalStyle('#creator-subheader  { background: #333 !important; } ');

addGlobalStyle('.caption-queue { background: #333 !important; } ');

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

addGlobalStyle('.settings-panel { background: #333 !important; } ');

addGlobalStyle('.yt-uix-overlay-actions { background: grey !important; }');

addGlobalStyle('.yt-uix-form-input-text { background-color: #333 !important; } ');

addGlobalStyle('#yt-masthead-container  , #yt-masthead .yt-masthead-logo-container , .logo , #yt-masthead{ background-color: #6E6E6E !important; } ');

addGlobalStyle('ytd-button-renderer #button.ytd-button-renderer , ytd-topbar-menu-button-renderer #button.ytd-topbar-menu-button-renderer , ytd-notification-topbar-button-renderer #button.ytd-notification-topbar-button-renderer{  background: #6E6E6E !important; }');

addGlobalStyle('.yt-live-chat-participant-list-renderer-0 #header.yt-live-chat-participant-list-renderer{ backgound-color: #333 !important; } ');
// END

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址