Last active
December 27, 2015 12:47
-
-
Save dumptyd/5a13fcabdb9d862946c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name YouTube Filter | |
// @namespace sadEmoji | |
// @author sadEmoji | |
// @description Filters YouTube Videos (only works on firefox) | |
// @include https://www.youtube.com/results?search_query=* | |
// @version 1.2.3 | |
// @grant none | |
// @require https://code.jquery.com/jquery-2.1.4.min.js | |
// ==/UserScript== | |
vscript=document.createElement('script'); | |
vscript.src='https://code.jquery.com/jquery-2.1.4.min.js'; | |
vscript.type='text/javascript'; | |
vscript.id='fuck'; | |
document.getElementsByTagName('head')[0].appendChild(vscript); | |
setInterval(function(){filter()},1000); | |
function filter() | |
{ | |
//Enter the blocked words here | |
blockedWords=["MrSuicideSheep","Justin Bieber"]; | |
totalResults=$(".yt-lockup-content").length; | |
$(".yt-lockup-content").each(function() | |
{ | |
for(i=0;i<blockedWords.length;++i) | |
{ | |
//alert($(this).text()) | |
if($(this).text().toUpperCase().contains(blockedWords[i].toUpperCase())) | |
{ | |
//alert(a); | |
$(this).parent().hide(); | |
//alert("yes"); | |
return; | |
} | |
} | |
}) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment