// ==UserScript== // @name YouTube Noise Disposal // @namespace Mozai // @description Gets rid of 'recommended' and 'added a comment' noise // @include http://www.youtube.com/ // @include https://www.youtube.com/ // @include http://youtube.com/ // @include https://youtube.com/ // @version 2012120701 // ==/UserScript== (function() { "use strict"; // get rid of the "channels you may also like" sidebar var ss = document.createElement('style'); // not using GM_addStyle() because it might not work in Chrome or Midori ss.type = 'text/css'; ss.innerHTML = "div.branded-page-v2-secondary-col {height:0; width:0; display:none;}"; document.getElementsByTagName('head')[0].appendChild(ss); // a banner ad that uses 40% of the screen height? really? var ss = document.createElement('style'); ss.type = 'text/css'; ss.innerHTML = "div#ad_creative_1 {height:0; width:0; display:none;}"; document.getElementsByTagName('head')[0].appendChild(ss); // can't get rid of the iframes, so shrink them instead var ifs = document.getElementsByTagName('iframe'); for (var i; i=0; i--) { var ele = eles[i]; if (ele.className.search('feed-item-container') >= 0) { if (ele.textContent.search('Recommended for you ') >= 0) { // Recommending Hanna Montana videos? Really? // How much payola are you taking under the table? ele.style.height = 0; ele.style.display = 'none'; } else if (ele.textContent.search(' replied to a comment from ') >= 0) { // if I wanted to evesdrop on other people's conversations, // I'd install a keylogger on their workstation ele.style.height = 0; ele.style.display = 'none'; } // oh goddamn it, now they're putting "uploaded and replied to" // to inject creepy stalker crap into what I'm actually here for. else if (ele.textContent.search(/ uploaded /) < 0) { // I come to YouTube for the uploads, not the likes // If I wanted to adore some blogged, I'd go to their tumblr ele.style.height = 0; ele.style.display = 'none'; } } } // wait... YouTube is using endless scrolling? // The page's content changes if I touch the window's scrollbar? // Is Rick James gonna hafta setInterval() a bitch? })();