NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @name Youtube Custom Theme v3
// @namespace https://xe0f9.github.io/
// @version 2021.3.31
// @description Maybe
// @author Louis Dalibard
// @match https://www.youtube.com/*
// @grant none
// @copyright 2020, OnTake (https://openuserjs.org/users/OnTake)
// @license MIT
// ==/UserScript==
//Customisation variables
//Customisation Text
const textfont = "\"Exo 2\""; // Goldman ; Roboto Mono ; Noto Sans ; Open Sans ; Roboto ; Ubuntu ; Space Grotesk ; Noto Sans JP ; Source Sans Pro ; Anton ; Libre Baskerville ; Exo 2 ; Advent Pro
//Customisation colors
//Customisation misc
const cornerradius = "10px";
const cornerradiussmall = "10px";
function setcss() {
var csselement = document.createElement("style");
csselement.className = "youtube-skin-css";
// CSS Imports
csselement.innerHTML = "@import url('https://fonts.googleapis.com/css2?family=Goldman&family=Noto+Sans&family=Open+Sans&family=Roboto&family=Roboto+Mono&family=Space+Grotesk&family=Ubuntu&family=Noto+Sans+JP&family=Source+Sans+Pro&family=Anton&family=Libre+Baskerville&family=Exo+2&family=Advent+Pro&display=swap');";
// Set Body CSS
csselement.innerHTML += "body{"
csselement.innerHTML += "font-family:" + textfont + ";"
csselement.innerHTML += "}";
// Set Searchbar CSS
csselement.innerHTML += "#search-input.ytd-searchbox-spt input {"
csselement.innerHTML += "font-family:" + textfont + ";"
csselement.innerHTML += "}";
// Set Video Player CSS
csselement.innerHTML += ".html5-video-player {"
csselement.innerHTML += "font-family:" + textfont + ";"
csselement.innerHTML += "}";
// Set Captions CSS
csselement.innerHTML += ".ytp-caption-segment {"
csselement.innerHTML += "font-family:" + textfont + " !important;"
csselement.innerHTML += "}";
// Variables
let root = document.documentElement;
root.style.setProperty('--paper-font-subhead_-_font-family', textfont);
//root.style.setProperty('--dark-primary-color', darkprimarycolor);
// Add stylesheet to HTML document
document.head.appendChild(csselement);
}
(function() {
'use strict';
//Set CSS
setcss();
})();