youtubpItvl

By lucianolllg Last update Jan 30, 2012 — Installed 1,439 times.

There are 67 previous versions of this script.

/*<![CDATA[*//*
// ==UserScript==
// @name          youtubpItvl
// @description   personal configurations for youtube
// @match         http://*.youtube.com/*
// @include       http://*youtube.com/*
// @namespace     userscripts.org/users/46776
// ==/UserScript==*/
 function remWatchs(){
	var aswatch=['footer'],
doc=document,rempr=function(ref){ref.parentNode.removeChild(ref);};
   for(var j=aswatch.length,tmp=[],tpr=[],n=0,ads;j--;){ads=doc.getElementById(aswatch[j]);if(ads){tmp[n]=ads;tpr[n]=ads.parentNode;n++;}}
   for(var i=tmp.length;i--;){tpr[i].removeChild(tmp[i]);}
 }

 function adfmtChannel(){
	var refmt=function(ac,ref){
if(ref.search(/watch/)!=-1){ac.href=ref.replace(/\&feature=(related|channel_page|channel)/gi,'');}
},doc=document,getanc=doc.getElementsByTagName('a');
   for(var i=getanc.length,anc;i--;){anc=getanc[i];refmt(anc,anc.href);}
 }

 var confget={
 adcod: function(){
	var doc=document,adc=doc.getElementById('watch-headline-container'); if(adc){
adcom=adc.getElementsByTagName('h1')[0],adcpr=adcom.parentNode,
adas=adcom.textContent.replace(/\//g,'-').replace(/\:/g,' -').replace(/\&/g,'y').replace(new RegExp(unescape('\\%22|\\%28|\\%29|\\%5B|\\%5D'),'g'),' ').replace(/Part\s/,'part ').replace(/\s{2,}/g,' ').replace(/^\s/,'').replace(/\s\./g,'.'),
adinp=doc.createElement('input');
	adinp.setAttribute('type','text');adinp.setAttribute('value',adas);
	adinp.setAttribute('onclick','this.focus();this.select();');
	adinp.setAttribute('onmousedown','this.focus();this.select();');
	adinp.style.cssText="width:630px;border:none;font-family:Arial;font-size:16px;font-weight:700;color:#104040;padding-left:5x;";
	adcpr.replaceChild(adinp,adcom);
  }
 }
 };

 function adstyle(){
	var doc=document,adstyle=doc.createElement('style');
 var codi={
 uservid: "body{background-image:none!important;}a:visited{border-bottom:1px dotted #007736;}a:visited:hover{color:#000000;background-color:#f6fff4;}#masthead a{font-size:12px;}#videosPofileVideos{max-width:800px;}a:visited img{outline:solid 2px #aaa0a0;}",
 texti120: "#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{height:99px!important;}"
 };
	adstyle.appendChild(doc.createTextNode([codi.uservid,codi.texti120].join(''))); codi=null;
	doc.getElementsByTagName('head')[0].appendChild(adstyle);
 }

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


/*]]>*/