From b44c3136e2f6c694ba0cad07e08a40db0c894f29 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Fri, 23 Dec 2011 23:15:39 +0100 Subject: [PATCH] Use the initCommand hook on Rai.tv In order to enable the rendering of the element containing the mediaURI we need, we spoof a SilverLight installation. Signed-off-by: Antonio Ospite --- direct_download_links.user.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/direct_download_links.user.js b/direct_download_links.user.js index fdf6ece..7da37b1 100644 --- a/direct_download_links.user.js +++ b/direct_download_links.user.js @@ -30,8 +30,6 @@ // @include http://www.rai.tv/* // ==/UserScript== // -// NOTE, for rai.tv to work you need to install a script like: -// http://git.ao2.it/smooth-dl.git/blob_plain/HEAD:/scripts/SilverSpoof.user.js /* * TODO: @@ -101,6 +99,11 @@ var supported_sites = [ }, { locationRegexp: /^http:\/\/www\.rai\.tv\/.*$/, + initCommand: function(site) { + unsafeWindow.Silverlight.isInstalled = function(version) { + return true; + }; + }, urlContainer: 'Player', urlRegexp: /mediaUri=(http:\/\/[^,]*)/, onEvent: { evt: 'DOMNodeInserted', targetElement: 'object' }, -- 2.1.4