X-Git-Url: https://git.ao2.it/GM_direct_download_links.git/blobdiff_plain/ad31d74355c6168d3bbccceb8bcbfbc2c20ca4d6..15d19652007f2070866f213a27dc3f425366bf10:/direct_download_links.user.js?ds=inline diff --git a/direct_download_links.user.js b/direct_download_links.user.js index 6fa53ed..37bca00 100644 --- a/direct_download_links.user.js +++ b/direct_download_links.user.js @@ -1,7 +1,7 @@ // direct_download_links - Add direct download links -// version 0.3 -// 2011-12-23 -// Copyright (C) 2011 Antonio Ospite +// version 0.4 +// 2012-02-12 +// Copyright (C) 2011,2012 Antonio Ospite // Released under the GPL license // http://www.gnu.org/copyleft/gpl.html // @@ -78,7 +78,7 @@ var supported_sites = [ { locationRegexp: /^http:\/\/video\.repubblica\.it\/.*$/, urlContainerXPath: '//div[@id="contA"]', - urlRegexp: /'pcUrl', '((http|mms):\/\/[^']*)'/, + urlRegexp: /[^\/]addParam\('format', '[^']*', '((http|mms):\/\/[^']*)'/, linkDestXPath: '//div[@id="contA"]', }, { @@ -98,14 +98,14 @@ var supported_sites = [ locationRegexp: /^http:\/\/www\.kataweb\.it\/tvzap\/.*$/, urlContainerXPath: '//div[@id="tvzap_video"]', urlRegexp: /'pcUrl', '((http|mms):\/\/[^']*)'/, - linkDestXPath: '//div[@id="playerCont"]', + linkDestXPath: '//div[@id="tvzap_video"]', }, { locationRegexp: /^http:\/\/www\.rai\.tv\/.*$/, - initCommand: function(site) { - unsafeWindow.Silverlight.isInstalled = function(version) { - return true; - }; + initCommand: function(site) { + unsafeWindow.Silverlight.isInstalled = function(version) { + return true; + }; }, urlContainerXPath: '//div[@id="silverlightControlHost" or @id="SilverlightPlayer"]', urlRegexp: /mediaUri=(http:\/\/[^,]*)/, @@ -146,7 +146,7 @@ function getElementByXPath(query, root) { * @return: null on error, true on success */ function direct_download_link_add(pageURL, site) { - site.pageURL = pageURL + site.pageURL = pageURL; var element = getElementByXPath(site.urlContainerXPath); if (!element) { DDL_log('DirectDL (' + site.pageURL + '): Cannot find the element ' + site.urlContainerXPath + ' containing the URL.');