🎉 欢迎访问GreasyFork.Org 镜像站!本镜像站由公众号【爱吃馍】搭建,用于分享脚本。联系邮箱📮

Greasy fork 爱吃馍镜像

YouTube Like/Dislike Shortcuts

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

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

Author
warib64
Daily installs
0
Total installs
92
Ratings
1 0 0
Version
5.3
Created
2023-12-11
Updated
2025-11-03
Size
23.5 KB
License
MIT
Applies to

This script enables shortcuts to like/dislike a YouTube video/Short using configurable keys, which are numpad + and - by default. It also allows you to scroll to (on videos) or open (on Shorts) and write comments with shortcuts, by default numpad * and / (multiplication and division symbols). Using the comments shortcut again closes the comments on Shorts, and on videos either scrolls to the top of the page, or back to where you where when you used the shortcut. This behavior is configurable by changing the savePosition variable (it goes to the top by default). It has the same behavior as on Shorts if it's in fullscreen.

It now also enables the C key shorcut to toggle captions on regular videos to be used on Shorts as well.

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.

There's also another variable named codeRemove; assigning a code value to that variable creates another shortcut specifically for removing your like/dislike, and makes it so that pressing the same shortcut multiple times has no effect, while by default pressing it while the video/Short is liked/disliked removes said like/dislike.

If you need to, you can find out the keyboard event code value of the key you want to use in the "code" column here. You can also set your shortcuts to only be triggered when pressed along with the ctrl, shift, or alt key, if you want.

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

I have limited knowledge of JavaScript and this was my first user script, so feel free to improve it yourself, as I'm sure there's much room for that. 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.

In case you only want the most basic functionality, use the Lite version.

Sounds:

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

droplet_bad.mp3 by willy_ineedthatapp_com -- https://freesound.org/s/167328/ -- License: Creative Commons 0