Greasy Fork is available in English.

YouTube Like/Dislike Shortcut

Enables keyboard shortcuts to like/dislike a video on YouTube.

Yazar
will64gamer
Günlük kurulumlar
0
Toplam kurulumlar
28
Değerlendirmeler
0 0 0
Versiyon
2.3
Oluşturulma
11.12.2023
Güncellenme
02.05.2024
Lisans
MIT
Geçerli

A simple shortcut to like/dislike a YouTube video using predefined keys, which are numpad + and - by default, and on Shorts it now also allows you open and write comments with shortcuts, by default numpad * and / (multiplication and division symbols). You can change the key by assigning the code value for the desired keyboard event to the variables codeLike, codeDislike, codeComments and codeWrite as a string. You can find a list of keyboard event code values here.

Based on the script "Youtube like/dislike video and skip ad keyboard shortcuts", which didn't work properly as of December 2023.

It also works on Shorts, but it does so by refreshing the page each time you scroll down; if you don't want this behavior change the value os shortsRefresh to false, but that makes it so that the first accessed Short is always targeted regardless of which is the current one being viewed.

I have a very limited knowledge of JavaScript and this is my first user script, so feel free to improve it yourself as I'm sure there's much room for that. Sometimes it gets the wrong like button element on shorts and I have no idea how I could fix that, so I think I'm just going to have to live with that bug. Avoid pressing the key before its corresponding button loads; if you do that and it doesn't work, try refreshing the page and waiting for it to load first.