YouTube Short Link Copier

Copy the short YouTube link directly when pressing Shift + S, and with timestamp when pressing Shift + C.

這裡只顯示彼此間有代碼差異的版本。 顯示所有版本。

  • v3.2 2023-09-26

    Added support for timestamp copying via Shift+C

  • v3.1 2023-09-25

    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.

  • v3.0 2023-09-25

    Added support for YouTube Music and YouTube Shorts

  • v0.2 2023-09-10
  • v0.1 2023-08-29

QingJ © 2025

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