Skip to content

Instantly share code, notes, and snippets.

View cgrimal's full-sized avatar

Clément Grimal cgrimal

View GitHub Profile
$.getJSON(decodeURIComponent($('#main-player iframe').attr('src').match(/json_url=([^&]+)/)[1]), function(data) {
var videos = data['videoJsonPlayer']['VSR'];
var html = '<div style="z-index:9999; margin: 3em;">';
html += '<h1>Téléchargez votre vidéo au format désiré :</h1>';
html += '<ul>';
Object.keys(videos).forEach(function(vcode){
var video = videos[vcode];
var url = video['url'];
var label = video['versionLibelle'] + ' - ' + video['width'] + 'x' + video['height'];
html += '<li>';