Greasy Fork is available in English.

YouTube Short Link Copier

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

A continuación se muestran las versiones de este script en las que se actualizó el código. Ver todas las versiones.

  • v3.2 26/9/2023

    Added support for timestamp copying via Shift+C

  • v3.1 25/9/2023

    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 25/9/2023

    Added support for YouTube Music and YouTube Shorts

  • v0.2 10/9/2023
  • v0.1 29/8/2023