Greasy Fork

Video Repubblica in HTML5

Allows to watch MP4 videos on the Repubblica.it website with a HTML5 container

目前为 2020-06-09 提交的版本。查看 最新版本

// ==UserScript==
// @name         Video Repubblica in HTML5
// @namespace    http://andrealazzarotto.com/
// @version      1.1
// @description  Allows to watch MP4 videos on the Repubblica.it website with a HTML5 container
// @author       Andrea Lazzarotto
// @match        http://video.repubblica.it/*
// @match        https://video.repubblica.it/*
// @copyright    2012+, Andrea Lazzarotto - GPLv3 License
// @require      http://code.jquery.com/jquery-latest.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 autoplay width="100%" height="100%"></video>');
});