Video Repubblica in HTML5

Guarda i video su Repubblica.it in MP4 con un contenitore HTML5

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name            Video Repubblica in HTML5
// @name:it         Video Repubblica in HTML5
// @namespace       http://andrealazzarotto.com/
// @version         1.1.2
// @description     Watch MP4 videos on the Repubblica.it website with a HTML5 container
// @description:it  Guarda i video su Repubblica.it in MP4 con un contenitore HTML5
// @author          Andrea Lazzarotto
// @match           http://video.repubblica.it/*
// @match           https://video.repubblica.it/*
// @require         https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.1/jquery.min.js
// @license         GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html
// ==/UserScript==

$(document).ready(function() {
	var contentURL = $("script[type*='ld+json']").text().split('contentUrl')[1].split('"')[2] || false;
	if(!!contentURL && contentURL.indexOf('.mp4') > 0) {
		$('#playerCont').empty().append('<video src="' + contentURL + '" controls width="100%" height="100%"></video>');
    }
});