Skip to content

Instantly share code, notes, and snippets.

@sunetos
Last active August 29, 2015 13:57
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 sunetos/9578378 to your computer and use it in GitHub Desktop.
Save sunetos/9578378 to your computer and use it in GitHub Desktop.
Udacity Video Auto-Expand
// ==UserScript==
// @name Udacity Video Auto-Expand
// @namespace http://about.me/adam.r.smith
// @version 1.0
// @description Make Udacity videos automatically fill the page. Handy with Chromecast/Airplay.
// @match https://www.udacity.com/course/viewer
// @copyright 2014+, http://about.me/adam.r.smith
// ==/UserScript==
var w = 1280,
h = 720;
$(function() {
setInterval(function() {
$('.scale-media>iframe').each(function(i, v){
if ($(this).css('position') === 'fixed') return;
$(this).attr('width', 1280).attr('height', 720)
.attr('src', $(this).attr('src') + '&vq=hd720')
.css({position: 'fixed', zIndex: '10000'});
});
}, 250);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment