public
Created

Make direct video link for YAPC 2012 Live Streams

  • Download Gist
ics.webcast.uwex.edu.js
JavaScript
1 2 3 4 5 6 7 8
$(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>');
});
});

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.