Greasy Fork 支持简体中文。

youtubepItvl

personal stylesheets css configurations for youtube

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

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