Vkontakte video downloader

By Alexander N. Skovpen Last update Aug 16, 2009 — Installed 14,220 times. Daily Installs: 29, 33, 44, 40, 29, 29, 36, 40, 31, 28, 35, 25, 43, 41, 39, 30, 36, 35, 35, 32, 18, 39, 19, 27, 33, 33, 36, 17, 23, 31, 30, 40

There are 3 previous versions of this script.

// ==UserScript==
// @name           Vkontakte video downloader 
// @namespace      http://vkontakte.ru/video*
// @description    add button to download video from vkontakte.ru work with firefox, opera and google chrome ($Revision: 1.14 $)
// @include        http://vkontakte.ru/video*
// @match        http://vkontakte.ru/video*
// ==/UserScript==

// $Id: vkontakte_video.user.js,v 1.14 2009/05/11 15:07:37 green Exp $
// up

		  
if ((/video-(\d+)_(\d+)/.exec(window.location))||(/video(\d+)_(\d+)/.exec(window.location)))
{
     var allText = document.documentElement.innerHTML;
     var vtag=/vtag:.(.*?).,/.exec(allText);
     var vkid=/vkid:.(.*?).,/.exec(allText);
     var host=/host:.(.*?).,/.exec(allText);
	 var url="http://"+host[1]+"/assets/videos/"+vtag[1]+vkid[1]+".vk.flv";
	var addon=document.createElement("a");
     addon.setAttribute("href",url);
     addon.innerHTML="<br>[download FLV]";
     document.getElementById("bigSummary").appendChild(addon);
     var addon=document.createElement("a");
     addon.setAttribute("href","http://vixy.net?u="+url);
     addon.innerHTML="[download AVI/MOV/MP4/MP3/3GP]";
     document.getElementById("bigSummary").appendChild(addon); 	
	
	

}