Last active
January 4, 2016 10:49
-
-
Save headquarters/8611507 to your computer and use it in GitHub Desktop.
This bookmarklet adds a download link for videos in Sakai so you can quickly download the files for playback in an external video player. Finding iframes by title isn't ideal, but it works for both places Announcements appear in Sakai. Also, the space after the title for each iframe is required.
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
var iframeObjects=$('iframe[title="Recent Announcements "], iframe[title="Announcements "]').contents().find('object');iframeObjects.each(function(){var flashVarsArray=$(this).find('param[name="FlashVars"]').val().split('=');var url=flashVarsArray[1];var url=url.split('&')[0];$(this).after('<div><a href="'+url+'">Link to Download Video</a></div>');}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment