Userscript: Hide watched YouTube videos from subscriptions page.

Just a quick one that does what it says on the tin. Not particularly elegant, and it uses jQuery, so not particularly lightweight either. Does clean up the YT subscriptions page though…

// ==UserScript==
// @name YT HideWatched
// @namespace http://orismology.me/
// @version 0.1
// @description Hide Watched Videos From YT Subscription List
// @author Dominic Mulligan
// @match https://www.youtube.com/feed/subscriptions*
// @grant GM_getValue
// @grant GM_setValue
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js

// ==/UserScript==

(function() {
var checkboxCell = $(".yt-uix-menu-container.feed-item-action-menu");
if (checkboxCell.length) {
checkboxCell.append (
'<small><label><input type="checkbox" class="checkbox" name="watchCheckbox" value="1" />'+ '&nbsp;<strong>Hide watched videos</strong></label></small>'
);

$("input[name='watchCheckbox']").change (myCheckboxChangeHandler);

if(GM_getValue("hideWatched")=="1"){
$("input[name='watchCheckbox']").prop('checked', true);
$(".yt-lockup-thumbnail.watched").parent().parent().parent().css("display","none");

}
}

function myCheckboxChangeHandler () {
if(this.checked){
$(".yt-lockup-thumbnail.watched").parent().parent().parent().css("display","none");
GM_setValue("hideWatched", "1");
}else {
$(".yt-lockup-thumbnail.watched").parent().parent().parent().css("display","inline-block");
GM_setValue("hideWatched", "0");
}
}

})();