Last active
August 29, 2015 13:57
-
-
Save sunetos/9578378 to your computer and use it in GitHub Desktop.
Udacity Video Auto-Expand
This file contains hidden or 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
// ==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