From: Antonio Ospite Date: Mon, 14 Nov 2011 10:17:54 +0000 (+0100) Subject: Support Repubblica TV Live, which streams using mms transport X-Git-Tag: 0.2~2 X-Git-Url: https://git.ao2.it/GM_direct_download_links.git/commitdiff_plain/7bbcfaf476f39716b20897ce799829284d127f3e Support Repubblica TV Live, which streams using mms transport Tweak also the style to avoid overlapping with other page elements. Signed-off-by: Antonio Ospite --- diff --git a/direct_download_links.js b/direct_download_links.js index a90fca0..6d0f401 100644 --- a/direct_download_links.js +++ b/direct_download_links.js @@ -39,25 +39,25 @@ var supported_sites = [ { locationRegexp: /^http:\/\/video\.repubblica\.it\/.*$/, fileElem: 'contA', - fileRegexp: /'pcUrl', '(http:\/\/[^']*)'/, + fileRegexp: /'pcUrl', '((http|mms):\/\/[^']*)'/, linkDest: 'contA', }, { locationRegexp: /^http:\/\/tv\.repubblica\.it\/.*$/, fileElem: 'boxPlayer', - fileRegexp: /'pcUrl', '(http:\/\/[^']*)'/, + fileRegexp: /'pcUrl', '((http|mms):\/\/[^']*)'/, linkDest: 'box_embed', }, { locationRegexp: /^http:\/\/trovacinema\.repubblica\.it\/.*$/, fileElem: 'col-center', - fileRegexp: /'flvUrl', '(http:\/\/[^']*)'/, + fileRegexp: /'flvUrl', '((http|mms):\/\/[^']*)'/, linkDest: 'col-center', }, { locationRegexp: /^http:\/\/www\.kataweb\.it\/tvzap\/.*$/, fileElem: 'tvzap_video', - fileRegexp: /'pcUrl', '(http:\/\/[^']*)'/, + fileRegexp: /'pcUrl', '((http|mms):\/\/[^']*)'/, linkDest: 'playerCont', }, ]; @@ -111,12 +111,12 @@ function direct_download_link_add(pageURL, fileElem, fileRegexp, linkDest) { } var download_link = document.createElement('a'); - download_link.textContent = 'Direct Download'; + download_link.textContent = 'Direct Link'; download_link.setAttribute('href', fileURL); var style = 'background-color: white; color: blue;'; style += ' border: 2px solid red;' - style += ' float: left; font-size: large;'; - style += ' padding: .5em; margin-left: 30px; margin-bottom: 1em;' + style += ' float: right; font-size: large;'; + style += ' padding: .5em; margin: 1em;' download_link.setAttribute('style', style); links.insertBefore(download_link, links.firstChild);