Discussions » Creation Requests

YouTube Video Hider 2.0

§
Posted: 2022-05-12
Edited: 2022-05-12

I am asking any one who can remake this script called "YouTube Video Hider" since the original (https://greasyfork.org/en/scripts/371287-youtube-video-hider-to-only-listen-to-audio) is now broken with the new May 2022 video layout which as shown in this picture. It doesn't anymore show the "Show/hide video" option which was seen in the older layouts.

I already reported this to the developer of the original script but if in case there's no reply then this remake will be new one for the future layouts it may happen.

The reason also I am asking is that I have no idea if the developer is active since the script was made in 2018 and wasn't updated regularly, and with the new layout, it breaks the way it works since the script was made in the old polymer layout (?) and this one, they use a different layout.

Here's the code of the script to start with: https://greasyfork.org/en/scripts/371287-youtube-video-hider-to-only-listen-to-audio/code

q1k
§
Posted: 2022-05-13

You can use this script to bring back the old layout

q1k
§
Posted: 2022-05-13

If you want to use the new layout, then on line 16 add this:
$('ytd-watch-metadata #description #snippet-text span.style-scope.yt-formatted-string:first-child').append(' <label><input type="checkbox" id="hide-vid"/> Show video</label>');
See screenshot

§
Posted: 2022-05-13
Edited: 2022-05-13

If you want to use the new layout, then on line 16 add this:

$('ytd-watch-metadata #description #snippet-text span.style-scope.yt-formatted-string:first-child').append(' <label><input type="checkbox" id="hide-vid"/> Show video</label>');


See screenshot



Tried your suggestion and the old description is back... but when clicking "Show video" it will not show the video, it will still blacken the video (thus the name "YouTube Video Hider"). Disabling the "old description" script makes the video hider script work temporarily on the new description but will not work when clicking on another video after opening the description.

§
Posted: 2022-05-13

UPDATE: Already repasted the default script and works on the "proper description" script. Not on the new description which is mentioned at the top.

q1k
§
Posted: 2022-05-13
Edited: 2022-05-13

You can keep using the Video Hider script unedited if you bring back the old layout.

Post reply

Sign in to post a reply.