// ==UserScript== // @name New Filtered Netflix // @namespace http://www.netflix.com/ // @version 0.2 // @description A replacement for the filtered Netflix of the past. Written in a bit of a drunken rage so no QA has been done. I got around the now lack of Netflix API by checking the boxes that popup and looking for a rating, and then saving the info into localStorage. Thus, it will not filter things until you've hovered over them once. // @match http://*.netflix.com/* // @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js // @copyright 2014+, Nigel Fish // @author Nigel Fish // @downloadURL none // ==/UserScript== $(document).ready(function() { function hideThatTitleYo(title) { var selector = 'img[alt="' + title + '"]'; $(selector).css({ '-webkit-filter' : 'grayscale(100%)', '-moz-filter' : 'grayscale(100%)', '-o-filter' : 'grayscale(100%)', '-ms-filter': 'grayscale(100%)', 'filter': 'grayscale(100%)', 'opacity': '0.4' }); } var titles = JSON.parse(localStorage.getItem("filteredTitlesYo")); if (titles === null) { titles = {}; } else { //loop and hide for (var key in titles) { hideThatTitleYo(key); } } $('.boxShot').hover(function() { //check if we've rated this movie //check the popup box name //wait a second first setTimeout(function() { var bobContent = $('.bobContent'); var bobTitle = bobContent.find('.bobMovieHeader .title').html(); if (bobTitle != undefined) bobTitle = bobTitle.trim(); //check if movie watched if ((bobContent).find('.sbmfrt').length != 0) { //store locally that it was watched and shade image titles[bobTitle] = true; localStorage.setItem("filteredTitlesYo", JSON.stringify(titles)); hideThatTitleYo(bobTitle); } }, 1000); }); $('.lockup').hover(function() { //check if we've rated this movie //check the popup box name //wait a second first setTimeout(function() { var bobContent = $('#bob'); var bobTitle = bobContent.find('.bob-header .title').html(); if (bobTitle != undefined) bobTitle = bobTitle.trim(); //check if movie watched if ((bobContent).find('.starbar').data('your-rating') != "") { //store locally that it was watched and shade image titles[bobTitle] = true; localStorage.setItem("filteredTitlesYo", JSON.stringify(titles)); hideThatTitleYo(bobTitle); } }, 1000); }); });