Created
February 26, 2020 15:42
-
-
Save csharpforevermore/defda6cac52080110b7fce102181112b to your computer and use it in GitHub Desktop.
Hide watched YouTube videos
This file contains hidden or 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
// example data | |
var selector = '.ytd-thumbnail-overlay-resume-playback-renderer'; // CSS selector for red bar indicating video has been watched | |
var exampleUrl = 'https://www.youtube.com/channel/UCN64HIrZNqFQYZ2BuyY-4zg'; // example URL for text | |
var jQueryInjectorExtension = 'https://chrome.google.com/webstore/detail/jquery-injector/ekkjohcjbjcjjifokpingdbdlfekjcgi?hl=en'; // url for chrome extension to inject jQuery into page for code below to run | |
$(selector) | |
.parent() // ytd-thumbnail-overlay-resume-playback-renderer.style-scope.ytd-thumbnail | |
.parent() // div#overlays.style-scope.ytd-thumbnail | |
.parent() // a#thumbnail.yt-simple-endpoint.inline-block.style-scope.ytd-thumbnail | |
.parent() // ytd-thumbnail.style-scope.ytd-grid-video-renderer | |
.parent() // div#dismissable.style-scope.ytd-grid-video-renderer | |
.parent() // ytd-grid-video-renderer.style-scope.yt-horizontal-list-renderer | |
.hide(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment