Skip to content

Instantly share code, notes, and snippets.

@prakashk
Created June 15, 2012 14:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prakashk/2936793 to your computer and use it in GitHub Desktop.
Save prakashk/2936793 to your computer and use it in GitHub Desktop.
Make direct video link for YAPC 2012 Live Streams
$(document).ready(function() {
$(".cardLink").each(function() {
var href = this.href;
var video_id = this.href.split('=')[1].replace(/^(.{8})(.{4})(.{4})(.{4})(.{12})..$/, '$1-$2-$3-$4-$5');
var video_link = "http://video.ics.uwex.edu/" + video_id;
$(this).parent().append('&nbsp;<a href="' + video_link + '">[Video]</a>');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment