Video Repubblica in HTML5

Watch MP4 videos on the Repubblica.it website with a HTML5 container

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==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>');
    }
});