By Jeremy C
Has 4 other scripts.
// ==UserScript==
// @name YouTube Junk Remover
// @author Jeremy Christian
// @date 2006-09-09
// @description Removes the advertisements and Director's videos.
// @namespace (none)
// @include http://www.youtube.com/*
// @include http://youtube.com/*
// ==/UserScript==
// Get the div with the header ad
var ad = document.getElementById("leaderboardAd");
ad.parentNode.removeChild(ad);
// Get the div with the side ad
var ad2 = document.getElementById("sideAdDiv");
ad2.parentNode.removeChild(ad2);
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);
}
// add css
addGlobalStyle('#sideAdDiv { display:none!important; width:0px; height:0px; padding:0px; }');
addGlobalStyle('.spOffersDiv { display:none!important; }');