Skip to content

Instantly share code, notes, and snippets.

@itst
Created March 29, 2018 08:41
Show Gist options
  • Save itst/cf4b53295d1b184e46e0ccca2c7a434c to your computer and use it in GitHub Desktop.
Save itst/cf4b53295d1b184e46e0ccca2c7a434c to your computer and use it in GitHub Desktop.
Bookmarklet to open DIY Captions with current YT video
javascript:void%20function(){window.open(%22http://diycaptions.com/php/get-automatic-captions-as-txt.php%3Fid=%22+location.href.match(/(^|=|\/)([0-9A-Za-z_-]{11})(\/|%26|$|\%3F|%23)/)[2]+%22%26language=asr%22)}();
Regex from https://stackoverflow.com/questions/3452546/how-do-i-get-the-youtube-video-id-from-a-url
Hat tip to Mike Ridgway of DIYCaptions.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment