Created
June 15, 2012 14:41
-
-
Save prakashk/2936793 to your computer and use it in GitHub Desktop.
Make direct video link for YAPC 2012 Live Streams
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(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(' <a href="' + video_link + '">[Video]</a>'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment