Support Repubblica TV Live, which streams using mms transport
authorAntonio Ospite <ospite@studenti.unina.it>
Mon, 14 Nov 2011 10:17:54 +0000 (11:17 +0100)
committerAntonio Ospite <ospite@studenti.unina.it>
Mon, 14 Nov 2011 10:17:54 +0000 (11:17 +0100)
Tweak also the style to avoid overlapping with other page elements.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
direct_download_links.js

index a90fca0..6d0f401 100644 (file)
@@ -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);