Source

flv_download / background.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<!-- Copyright 2010, M.23@gmx.com
Licensed under the GPLv2 license http://www.gnu.org/licenses/gpl-2.0.html -->
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
   <script>
      var knownSites = new Array(
         {
            name: 'Generic site...',
            vidUrl: /(http:\/\/[^ "]*\.flv(\?[\w=&]*)?)/
         },
         {
            regex:
               /http:\/\/.*(tube8.com|(libclip|novamov).com\/video|ted.com\/talk|blip.tv|empflix.com\/view|efukt.com|iseekgirls.com\/blog\/videos\/)/,
            name: 'Ted talks / Tube8 / Novamov / LibClip / BlipTV / Empflix / Efukt / ISeekGirls.com',
            vidUrl: /(http:\/\/[^ "]*\.flv(\?[\w=&]*)?)/g
         },
         {
            regex: /http:\/\/.*evilangel.com/,
            name: 'Evil Angel',
            vidUrl: /(http:\/\/trailers.evilangel.com\/.*.flv)/g
         },
         {
            regex: /http:\/\/.*elegantangel.com\/trailer/,
            name: 'Elegant Angel',
            vidUrl: /(http:\/\/data.elegantangel.com\/FLV_Trailers\/.*.flv)/g
         },
         {
            regex: /http:\/\/.*xhamster.com\/movies/,
            name: 'X Hamster',
            srvUrl: /'srv': '(http:\/\/[\d\.]*\/)'/,
            addUrl: "flv2/",
            vidUrl: /'file': '([^']*.flv)'/g
         },
         {
            regex: /http:\/\/.*myfemdomclips.com\/video/,
            name: 'My Femdom Clips',
            addUrl: "http://www.myfemdomclips.com/media/videos/flv/",
            vidUrl: /video_id = "(\d*)"/,
            addUrl2: ".flv"
         },
         {
            regex: /http:\/\/((.*xvideos)|(video.xnxx)).com\/video/,
            name: 'XVideos / XNXX',
            vidUrl: /'(http:\/\/[^ "']*.flv[^']*)'/g
         },
         {
            regex: /http:\/\/betaplayer.dailymotion.com\/video/,
            vidUrl:
            /"(http:\/\/betaplayer.dailymotion.com\/cdn\/FLV[^.]*\.flv[^"]*)"/g
         },
         {
            regex: /http:\/\/(www\.)?dailymotion.com\/video/,
            name: 'Dailymotion',
            normalize: true,
            vidUrl: /"(http:\\\/\\\/www.dailymotion.com\\\/cdn\\\/[FH][^.]*\.[^"]*)"/g
         },
         {
            regex: /http:\/\/.*youporn.com\/watch/,
            name: 'YouPorn',
            vidUrl: /"(http:\/\/download.youporn.com\/download\/[^"]*)">FLV/g
         },
         {
            regex: /http:\/\/.*youtube.com\/watch/,
            name: 'YouTube',
            normalize: true,
            vidUrl: /\d+\|(http:\/\/[^\|,"]*)/g
         },
         {
            regex: /http:\/\/.*liveleak.com\//,
            name: 'LiveLeak',
            normalize: true,
            vidUrl: /convert_url = "([^"]*)"/g
         },
         {
            regex: /http:\/\/.*metacafe.com\/watch/,
            name: 'MetaCafe',
            normalize: true,
            vidUrl: /mediaURL=(http:\/\/[^&]*.flv)&/g
         },
         {
            regex: /http:\/\/www.wisevid.com\/play/,
            name: 'WiseVid',
            vidUrl: /file='\+getF\('([^']*)'\)\+/g
         },
         {
            regex: /http:\/\/www.doyouflip.fr\/.*\/\w{11}$/,
            name: 'Flip Video (doyouflip.fr)'
         },
         {
            regex: /http:\/\/www.doyouflip.com\/watch\/.*$/,
            name: 'Flip Video (doyouflip.com) [through YouTube redirect]'
         },
         {
            regex: /http:\/\/www.veoh.com\/.*watch/,
            name: 'Veoh [only if video is really hosted on Veoh]'
         },
         {
            regex: /http:\/\/www.veoh.com\/rest\/v2\/execute.xml/,
            vidUrl: /previewUrl="(http:\/\/content.veoh.com\/flash[^"]*)"/
         },
         {
            regex: /http:\/\/www.break.com\/index/,
            name: 'Break',
            vidUrl:  /(http:\/\/[^ "]*\.flv(\?[\w=&]*)?)/g
         },
         {
            regex: /http:\/\/.*(keezmovies|extremetube|pornhub).com\//,
            name: 'KeezMovies / ExtremeTube / PornHub',
            vidUrl:  /flv_url>(http:\/\/.*\.flv)<\/flv_url/g
         },
         {
            regex: /http:\/\/www.wcpclub.com/,
            name: 'West Coast Prod',
            addUrl: 'http://www.wcpclub.com/',
            addUrl2: '',
            vidUrl: /file=(.*\.flv)/
         },
         {
            regex: /http:\/\/www.oneclicktube.com\/videos\//,
            name: 'One Click Tube',
            addUrl: 'http://www.oneclicktube.com/media/videos/',
            addUrl2: '.flv',
            vidUrl: /flashvars.id = "([^"]*)";/
         },
         {
            regex: /http:\/\/.*motherless.com\//,
            name: 'Motherless',
            vidUrl: /zzz/g
         }
      );
      chrome.tabs.onSelectionChanged.addListener(function(tabId, selectInfo) {
         checkUrl(tabId);
      });
      chrome.tabs.onCreated.addListener(function(tab) {
         checkUrl(tab.id);
      });
      chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {
         checkUrl(tabId);
      });
      function checkUrl(tabId) {
         chrome.tabs.get(tabId, function(tab) {
            if (knownUrl(tab.url)) {
               chrome.browserAction.setBadgeText({text: "ok"});
               chrome.browserAction.setBadgeBackgroundColor({
                  color: [255, 128, 0, 200]});
            } else {
               chrome.browserAction.setBadgeText({text: ''});
            }
         });
      };
      function knownUrl(url) {
         var found = false;
         var i = knownSites.length - 1;
         while ((! found) && (i>0))
            if (knownSites[i].regex.test(url))
               found = true;
            else
               i--;
         return i;
      };
      function bgLoad() {
         chrome.tabs.getSelected(null,function(tab){
            checkUrl(tab.id)
         });
      };
   </script>
   <script src="http://www.wisevid.com/getF.js"
      type="text/javascript"></script>
</head>
<body onload="bgLoad();">
</body>
</html>