YouTube Keyboard Shortcuts: like/dislike, backup/restore position, change speed, picture-in-picture…

Adds keyboard shortcuts [ and ] for liking and disliking videos, B and R to Back up and Restore position, H to use picture-in-picture, { and } to change playback speed.

< Opinie na YouTube Keyboard Shortcuts: like/dislike, backup/restore position, change speed, picture-in-picture…

Pytanie/komentarz

§
Napisano: 08-12-2023
Edytowano: 08-12-2023

YouTube have changed their HTML again, breaking the like/dislike shortcuts.

ytd-segmented-like-dislike-button-renderer has been replaced with segmented-like-dislike-button-view-model

The rest of findLikeDislikeButtons() still appears to be working.

§
Napisano: 09-12-2023

Yup, was about to post, the shortcuts no longer like/dislike. Hope it can be fixed.

§
Napisano: 12-12-2023

As MattSurgeon says, replacing 'ytd-segmented-like-dislike-button-renderer' with 'segmented-like-dislike-button-view-model' on line 164 fixes. Hope the author can update the main script. At least can use this workaround for now.

§
Napisano: 13-12-2023

The PictureInPicture keybind is also broken, however fixing that seems a little more complex. document.pictureInPictureElement, document.exitPictureInPicture() & video.requestPictureInPicture() no longer exist, although there's still some (dead?) YT code referencing them...

I was able to find document.querySelectorAll("button.ytp-pip-button"), which has a click event listener that calls the aforementioned dead code, however calling .click() has no effect. Therefore I suspect they're listening for taps/clicks some other way but have left the old (non-functional) click handler in for now.

Odpowiedz

Zaloguj się, by odpowiedzieć.