Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$.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>';
html += '<a style="color:white !important;" href="' + url + '">' + label + '</a>';
html += '</li>';
});
html += '</ul>';
html += '</div>';
$('html').prepend(html);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment