youtubepItvl

personal stylesheets css configurations for youtube

目前為 2015-08-05 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name          youtubepItvl
// @description   personal stylesheets css configurations for youtube
// @include       https://*youtube.com/*
// @include       http://*youtube.com/*
// @namespace     https://greasyfork.org/en/users/3561-lucianolll
// @namespace     https://openuserjs.org/users/lucianolll
// @namespace     https://userscripts.org/users/46776
// @grant     none
// @version     10
// ==/UserScript==
function remWatchs(){
	var aswat=['footer'],ads=function(){var doc=document,ad;return function(id){ad=doc.getElementById(id);return (ad!=null)? [ad,ad.parentNode]:n--;}}();
   for(var j=aswat.length,tmp=[],n=0;j--;){tmp[n++]=ads(aswat[j]);}
	tmp.forEach(function(v){v[1].removeChild(v[0]);});
}

var confget={
adcod: function(){
	var doc=document,adc=doc.getElementById('watch-headline-title'); if(adc){
	adcom=adc.getElementsByTagName('span')[0],cld=adcom.cloneNode(true);
	cld.textContent=cld.textContent.replace(/\//g,'-').replace(/\:/g,' -').replace(/\&/g,'y').replace(/[\\\|\(\)\[\]\{\}]/g,' ').replace(/Parte?\s/,'part ').replace(/\s{2,}/g,' ').replace(/^\s|\s$/g,'').replace(/\s\./g,'.');
	cld.style.cssText="border:none;font-family:Arial;font-size:17px;font-weight:700;color:#000000;text-shadow:.2px .3px 0 #306060;padding-left:5x;";
	adcom.parentNode.replaceChild(cld,adcom);cld=null;
	adc.ondblclick=function(){this.setAttribute('contentEditable','true');};
  }
}
};

function adstyle(){
	var doc=document,adstyle=doc.createElement('style'),
	uservid="body{background-image:none!important;background-color:rgb(236, 242, 234);}a:visited{border-bottom:1px dotted #007736;}#masthead a{font-size:12px;}#videosPofileVideos{max-width:800px;}a:visited img{outline:solid 2px #aaa0a0;}\
#watch-related li,#watch-sidebar li,#video-sidebar li{margin:0px!important;padding:0px!important;}#video-sidebar .ux-thumb-wrap{height:99px;}#playlist-pane-container .video-thumb,#watch-sidebar .video-thumb,#video-sidebar .video-thumb{height:92px;width:120px;}#playlist-pane-container a,#watch-sidebar a,#video-sidebar a{padding:0px!important;}.playnav-video-thumb .video-thumb,.thumb-wrapper{height:81px!important;}.video-list-item{height:76px;}#watch7-sidebar .video-thumb{height:75px;}.ux-thumb{height:70px;}\
#watch-related .video-list-item{height:78px;margin-bottom:1px!important;}#watch-related .yt-uix-simple-thumb-wrap{height:78px;}span img{top:-2px!important;}#watch-header button{-webkit-filter:hue-rotate(180deg);-moz-filter:hue-rotate(180deg);filter:hue-rotate(180deg);background-image:linear-gradient(to top,#606060,red 100%)!important;}";
	adstyle.appendChild(doc.createTextNode(uservid)); codi=null;
	doc.getElementsByTagName('head')[0].appendChild(adstyle);
}

  addEventListener('load',remWatchs,confget.adcod,adstyle,false);