YouTube Subscription Box Hack: How to Hide Videos in One Click

Question:

How can I create a one-click “hide” button for YouTube videos in my subscription box?

I use the “hide” button frequently to remove the videos that I have watched or do not want to watch from my subscription box. However, the button is hidden in a sub-menu and I have to click twice to access it. This is very inconvenient and time-consuming. I would like to move the button next to the video thumbnail, as shown in this example image. Is there a way to achieve this using Tampermonkey or any other coding method?

Answer:

How to create a one-click “hide” button for YouTube videos in your subscription box

YouTube is a popular platform for watching videos on various topics, from entertainment to education. However, if you subscribe to many channels, your subscription box can get cluttered with videos that you do not want to watch or have already watched. YouTube provides a “hide” button that allows you to remove these videos from your subscription box, but it is not very convenient to use. You have to click on the three-dot menu icon next to each video and then select “hide” from the sub-menu. This can be tedious and time-consuming, especially if you want to hide many videos at once.

Fortunately, there is a way to make this process easier and faster. You can use a browser extension called Tampermonkey, which allows you to run custom scripts on any website. With Tampermonkey, you can create a script that will move the “hide” button next to the video thumbnail, so that you can hide videos with one click. Here are the steps to do this:

1. Install Tampermonkey on your browser. You can find it on the official website: https://www.tampermonkey.net/

2. Create a new script by clicking on the Tampermonkey icon and selecting “Create a new script”.

3. Copy and paste the following code into the script editor:

“`javascript // ==UserScript== // @name YouTube One-Click Hide Button // @namespace https://greasyfork.org/en/scripts/431647 // @version 1.0 // @description Move the hide button next to the video thumbnail in the subscription box // @author Copilot // @match https://www.youtube.com/feed/subscriptions // @grant none // ==/UserScript== (function() { ‘use strict’; // Wait for the page to load window.addEventListener(‘load’, function() { // Get all the video elements in the subscription box let videos = document.querySelectorAll(‘#grid-container > ytd-grid-video-renderer’); // Loop through each video element for (let video of videos) { // Get the menu button element let menuButton = video.querySelector(‘#menu > yt-icon-button’); // Get the hide button element let hideButton = video.querySelector(‘#items > ytd-menu-service-item-renderer:nth-child(3)’); // Clone the hide button element let newHideButton = hideButton.cloneNode(true); // Remove the text from the new hide button element newHideButton.querySelector(‘#label’).remove(); // Add a tooltip to the new hide button element newHideButton.setAttribute(‘title’, ‘Hide’); // Insert the new hide button element before the menu button element menuButton.parentNode.insertBefore(newHideButton, menuButton); // Add a click event listener to the new hide button element newHideButton.addEventListener(‘click’, function() { // Trigger a click on the original hide button element hideButton.click(); }); } }); })(); “`

4. Save the script by clicking on the disk icon.

5. Reload the YouTube subscription page and enjoy your one-click hide button.

This script works by finding all the video elements in the subscription box and cloning the hide button element from the sub-menu. It then removes the text from the cloned button and adds a tooltip. It inserts the cloned button before the menu button and adds a click event listener that triggers a click on the original hide button. This way, you can hide videos with one click without opening the sub-menu.

You can customize the script to suit your preferences, such as changing the icon, the position, or the style of the button. You can also share the script with others who might find it useful. Tampermonkey is a powerful tool that can enhance your browsing experience with many websites. You can find more scripts on websites like https://greasyfork.org/ or https://openuserjs.org/. You can also learn how to create your own scripts by following tutorials like https://www.tampermonkey.net/documentation.php. Happy scripting!

Leave a Reply

Your email address will not be published. Required fields are marked *

Privacy Terms Contacts About Us