YouTube Like/Dislike Shortcut

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

目前為 2024-11-02 提交的版本,檢視 最新版本

作者
warib64
評價
0 0 0
版本
4.0
建立日期
2023-12-11
更新日期
2024-11-02
尺寸
8.5 KB
授權條款
MIT
腳本執行於

A simple shortcut to like/dislike a YouTube video/Short 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). It comes with a sound alert (on by default) that plays when you like the video. You can turn it off or change its volume if you want. 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. You can also set your shortcut to only be triggered when pressed along with the ctrl, alt, or shift key, if you want.

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

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.

Sound: Ceramic Bell 02 by Jagadamba -- https://freesound.org/s/254756/ -- License: Attribution 4.0

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址