Greasy Fork is available in English.

Youtube like/dislike video and skip ad keyboard shortcuts

Adds keyboard shortcuts [ and ] for liking and disliking videos, and s for skipping pre-video and banner ads.

< Feedback on Youtube like/dislike video and skip ad keyboard shortcuts

Review: Good - script works

§
Posted: 25.01.2018

Feature requests

1) "Add to WatchLater list" shortcut 2) compatibility with https://github.com/ParticleCore/Iridium (YouTube+) script 3) publish it on github.com or bitbucket.org for better track of versions and possibility of pull requests

§
Posted: 25.01.2018
Edited: 25.01.2018
  1. Toggle watch later would be better. IIRC you can add/remove videos from playlists with an ajax request, however this won't show the fancy "Added to PlaylistName" popup in the bottom left. I don't think there is a watchlater button on video pages anymore, you have to request a playlist form then add it to the document or something. Might make this feature too complex?
  2. This would be a case of using different shortcuts, or allowing them to be configured. Currently pressing s works correctly, however [ and ] are intercepted by Iridium. Alternatively Iridium could implement the functionality in this script itself.
  3. +1, github makes contributing to bugs, feature requests and code so much easier.
§
Posted: 25.01.2018

Oops, my bad. I assumed Iridium was intercepting key events, but actually it just happens to insert buttons right where this script looks for them (in ytd-video-primary-info-renderer).

To get around this, this script just has to be a little more specific. I have edited mine to look for ytd-menu-renderer inside of ytd-video-primary-info-renderer:

  videoinfo = document.getElementsByTagName("ytd-video-primary-info-renderer");
  videoinfo = (videoinfo.length == 1) ? videoinfo[0].getElementsByTagName("ytd-menu-renderer") : [];

Not the cleanest solution, but it works as a one line fix that means I don't end up re-writing half the script.

Post reply

Sign in to post a reply.