To Downlaod from Restube
Essay by review • February 8, 2011 • Research Paper • 1,084 Words (5 Pages) • 1,099 Views
/*
About IE7Pro
IE7Pro is a plugin for the Internet Explorer web browser. It allows you to change how your favorite pages behave and look. There are many scripts that have already been written, and if you know javascript you can easily create your own! This site is a repository to download and install IE user scripts.
How to install user script
1 . First you should have install IE7Pro 0.9.12 and above which support IE user scripts.
2. Check if IE7Pro "Preference" - "User Scripts" - "EnabLe User Script" is enabled.
3. Find your favorite scripts on iescripts.org and click "Install This Script" .
*/
// ==UserScript==
// @name RedTube Downloader
// @description This script resolves path+name of video files on redtube.com. Videos can be downloaded via "Share this Video" (link changed from /share to file path).
// @include http://*redtube.com/*
// ==/UserScript==
if (top==self)
{
var host=window.location.hostname;
var vid =window.location.pathname.substr(1);
var mediaSource;
function insertnotice()
{
var hrefNodes = document.getElementsByTagName('a');
for(var a = 0; a < hrefNodes.length; a++)
{
if(hrefNodes[a].getAttribute('href').substr(0,28) == "http://www.redtube.com/share")
{
hrefNodes[a].setAttribute('href', mediaSource);
}
}
}
function extracturls()
{
if (host.match(/redtube./i) !=null)
{
var p_file = "" + vid;
if(p_file == "" || p_file == "video.flv")
{
p_file = "1";
}
var v_fileFloat = "" + Math.floor(parseFloat(p_file) / 1000); // 477 --> 0.477 --> 0
var v_fileLength = p_file.length; // --> 3
for (var a = 1; a 0000477
}
v_fileLength = v_fileFloat.length; // --> 1
for (var a = 1; a 0000000
}
var map = new Array("R", "1", "5", "3", "4", "2", "O", "7", "K", "9", "H", "B", "C", "D", "X", "F", "G", "A", "I", "J", "8", "L", "M", "Z", "6", "P", "Q", "0", "S", "T", "U", "V", "W", "E", "Y", "N");
var mapping = "";
var myInt = 0;
for (var a = 0; a 0*1 = 0
0 --> 0*2 = 0
0 --> 0*3 = 0
0 --> 0*4 = 0
4 --> 4*5 = 20
7 --> 7*6 = 42
7 --> 7*7 = 49
myInt = 20+42+49 = 62+49 = 100+2+9=111
*/
}
...
...