Play & Download All ZooTube Videos by DemianGod (Including Premium Links!!!)

By DemianGod Last update Feb 17, 2009 — Installed 26,003 times. Daily Installs: 73, 67, 62, 94, 52, 41, 79, 55, 47, 55, 42, 30, 43, 43, 70, 50, 32, 25, 54, 34, 45, 41, 69, 56, 51, 54, 102, 40, 25, 42, 34, 37

There are 3 previous versions of this script.

// ==UserScript==
// @name           Play & Download All ZooTube Videos by DemianGod (Including Premium Links!!!)
// @namespace      zootube365.com
// @include        http://*zootube365.com/*
// ==/UserScript==

unsafeWindow.pop = function(url){newwin=window.open(url,'vid','height=509,width=640,location=1,resizable=1');};

var il = document.evaluate('//div[contains(@class,"aVideo")]', document, null, XPathResult.UNORDERED_NODE_ITERATOR_TYPE, null);
var i = il.iterateNext();
var vids = new Array();
while (i) {
ni = il.iterateNext(); vids.push(i); i = ni;
}

for (var i = 0; i < vids.length; i++)
{
    var curVid = vids[i];
	var imgtag = curVid.getElementsByTagName('img');
    var imSrc = imgtag[0].getAttribute('src').replace(/^http:\/\/[^\/]+\/(.+)\/([^\/]+)\/[^\/]+$/,"http://92.61.240.74/$1/$2/$2.flv");
    var newA = document.createElement('a');
	var newS = document.createElement('br');
	var newB = document.createElement('a');
	var temphref = 'http://www.zootube365.com/swf/player.swf?styleURL=/swf/player-style-a.css&content_video=';
	var temphref2 = '&detectFlash=8';
	var link = temphref + imSrc + temphref2;
    newA.href= "javascript:pop('"+link+"')";
    newA.appendChild(document.createTextNode("Play By DemianGod"));
    curVid.appendChild(newA); 
	newS.appendChild(document.createTextNode("br"));
	curVid.appendChild(newS); 
	newB.href = imSrc;
    newB.appendChild(document.createTextNode("Download By DemianGod"));
    curVid.appendChild(newB); 
}