XHamster Download

By KayKay Last update Jun 22, 2008 — Installed 27,833 times.

Add your review

2 reviews


3 stars
FIX for the script (works well for me now) , Feb 12, 2009
Review written by boblemur - see all my reviews (1)

The following code works for me, however its not well tested, so hope it works for you too :)

// ==UserScript==
// @name XHamster Download
// @description Adds a small download button to every video on XHamster
// @author KayKay Edited by Boblemur
// @namespace kk.tools
// @version 1cm
// @include http://xhamster.com/movies/*
// @include http://www.xhamster.com/movies/*
// ==/UserScript==

function get_url()
{
var scripts = document.getElementsByTagName('script');
for(var a = 0; a < scripts.length; a++)
{
if(scripts[a].text.indexOf("new SWFObject") != -1){
var file = scripts[a].text.split("'file','")[1].split("');")[0];
var svr = scripts[a].text.split("'srv','")[1].split("');")[0];
return "http://dl" + svr + ".xhamster.com/flv2/" + file;

}
}
}

var pnl_qs = document.getElementById("voteProcessthank").parentNode.parentNode.lastChild.previousSibling.firstChild.nextSibling;
var pnl_dl = document.createElement("td");
var lnk_dl = document.createElement("a");
pnl_dl.style.fontSize = "14px";
pnl_dl.appendChild(lnk_dl);
pnl_qs.appendChild(document.createElement("tr").appendChild(pnl_dl));

lnk_dl.href = get_url();
lnk_dl.appendChild(document.createTextNode("Download this video(right click, save as)"));

to use the code, install the script then edit the script and paste my code into it.

hope this helps.

0 comments |

0 out of 1 person found this review helpful
5 stars
Scrip fails now , Nov 10, 2008
Review written by Zero_Gusher - see all my reviews (1)

It was a pretty good script, but now its not working, is the re a chance of fix it?

0 comments |