From 9492ff446de99287d386f0a4221cfaaad0728aad Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Fri, 7 Jun 2013 23:00:50 +0200 Subject: [PATCH] Preliminary support for ArchivioLuce Not very useful, unless your browser supports WMV in a video tag. Also provide a direct link to help those in need. --- raitv.user.js | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/raitv.user.js b/raitv.user.js index fb64ad6..38bed37 100644 --- a/raitv.user.js +++ b/raitv.user.js @@ -6,11 +6,14 @@ // @include http://rai.it/* // @include http://www.rai.tv/* // @include http://www.rai.it/* +// @include http://archivioluce.com/* +// @include http://www.archivioluce.com/* // @author Giuseppe "Oblomov" Bilotta // @version 20130403.2015 // ==/UserScript== -/* Since the Chrome sandbox is _extremely_ restrictive and we can't access things such as window.videoURL from the actual document, +/* Since the Chrome sandbox is _extremely_ restrictive and we can't + * access things such as window.videoURL from the actual document, * we have to resort to script injection to be completely cross-platform. */ @@ -225,6 +228,22 @@ function() { console.log('playAudio hacked'); } } + + // Archivio Luce + if (window.ply && window.ply.configuration + && window.ply.configuration.file + && window.cnt) { + var src = window.ply.configuration.file.replace(/^mms:\/\//,'http://'); + var width = window.ply.configuration.width; + var height = window.ply.configuration.height; + + window.cnt.innerHTML = ""; + console.log(window.cnt, 'hacked'); + window.cnt.appendChild(H5aRaw("WMV", src)); + } }) })(); -- 2.32.0.93.g670b81a890