Copy the short YouTube link directly when pressing Shift + S, and with timestamp when pressing Shift + C.
目前为 2023-09-26 提交的版本。查看 最新版本。
这些是代码更新过的版本。 显示所有版本
Added support for timestamp copying via Shift+C
Function Extraction: Extracted the video ID extraction logic into a separate function called getVideoIDFromQuery to avoid repetition.Switch Statement: Replaced the sequence of if-else conditions with switch statement for clarity and structure.Early Exit: Introduced an early exit in the event listener to quickly return if the conditions aren't met, reducing the indentation level of the main logic.Simplified Logic: Removed some unnecessary checks to make the code more concise.Basically optimised for performance, this will probably be the last update as this is as good as I can make it unless youtube changes the way they format shortlinks.
Added support for YouTube Music and YouTube Shorts
土豆服务器,请按需使用
镜像地址随时可能被墙,建议加群获取最新地址
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址