├── .gitignore ├── screenshots └── screenshot.png ├── README.md └── ytHide-chrome ├── img ├── icon-128.png ├── icon-16.png ├── icon-38.png └── icon-48.png ├── manifest.json └── injector.js /.gitignore: -------------------------------------------------------------------------------- 1 | ytHide-chrome.zip 2 | -------------------------------------------------------------------------------- /screenshots/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frame/ytHide-chrome/master/screenshots/screenshot.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ytHide-chrome 2 | 3 | Adds a button to the YouTube subscriptions page that hides all watched videos. 4 | -------------------------------------------------------------------------------- /ytHide-chrome/img/icon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frame/ytHide-chrome/master/ytHide-chrome/img/icon-128.png -------------------------------------------------------------------------------- /ytHide-chrome/img/icon-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frame/ytHide-chrome/master/ytHide-chrome/img/icon-16.png -------------------------------------------------------------------------------- /ytHide-chrome/img/icon-38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frame/ytHide-chrome/master/ytHide-chrome/img/icon-38.png -------------------------------------------------------------------------------- /ytHide-chrome/img/icon-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frame/ytHide-chrome/master/ytHide-chrome/img/icon-48.png -------------------------------------------------------------------------------- /ytHide-chrome/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ytHide", 3 | "short_name": "ytHide", 4 | "description": "Adds a button to the YouTube subscriptions page that hides all watched videos.", 5 | "version": "1.1", 6 | "icons": { 7 | "128": "img/icon-128.png", 8 | "48": "img/icon-48.png", 9 | "38": "img/icon-38.png", 10 | "16": "img/icon-16.png" 11 | }, 12 | "homepage_url": "https://phalanx.at", 13 | "permissions": [ 14 | "https://www.youtube.com/feed/subscriptions" 15 | ], 16 | "content_scripts": [{ 17 | "matches": ["https://www.youtube.com/feed/subscriptions"], 18 | "js": ["injector.js"], 19 | "run_at": "document_end" 20 | }], 21 | "manifest_version": 2 22 | } -------------------------------------------------------------------------------- /ytHide-chrome/injector.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | 3 | function hideWatchedVideos() { 4 | document.querySelectorAll('.ytd-thumbnail-overlay-playback-status-renderer').forEach(function (el) { 5 | el.closest('ytd-grid-video-renderer').remove(); 6 | }); 7 | } 8 | 9 | var template = ` 10 | 18 | `; 19 | 20 | target = document.getElementById("top-level-buttons"); 21 | target.insertAdjacentHTML("afterbegin", template); 22 | document.getElementById("evt-hideWatchedVideos").addEventListener("click", hideWatchedVideos); 23 | 24 | })(); --------------------------------------------------------------------------------