<?xml version="1.0" encoding="UTF-8"?>
<post>
  <body>Hey as reported the code dosen't work.

// ==UserScript==
// @name XHamster Download
// @description Adds a small download button to every video on XHamster
// @author KayKay modified 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 &lt; scripts.length; a++)
    {
	if(scripts[a].text.indexOf(&quot;new SWFObject&quot;) != -1){
		var file = scripts[a].text.split(&quot;'file','&quot;)[1].split(&quot;');&quot;)[0];
		var svr = scripts[a].text.split(&quot;'srv','&quot;)[1].split(&quot;');&quot;)[0];
		return &quot;http://dl&quot; + svr + &quot;.xhamster.com/flv2/&quot; + file;

	}
    }
  }


var pnl_qs = document.getElementById(&quot;voteProcessthank&quot;).parentNode.parentNode.lastChild.previousSibling.firstChild.nextSibling;
var pnl_dl = document.createElement(&quot;td&quot;);
var lnk_dl = document.createElement(&quot;a&quot;);
pnl_dl.style.fontSize = &quot;14px&quot;;
pnl_dl.appendChild(lnk_dl);
pnl_qs.appendChild(document.createElement(&quot;tr&quot;).appendChild(pnl_dl));

lnk_dl.href = get_url();
lnk_dl.appendChild(document.createTextNode(&quot;Download this video(right click, save as)&quot;));

will amend this problem.</body>
  <body-html>&lt;p&gt;Hey as reported the code dosen't work.&lt;/p&gt;

&lt;p&gt;// ==UserScript==
&lt;br /&gt;// @name XHamster Download
&lt;br /&gt;// @description Adds a small download button to every video on XHamster
&lt;br /&gt;// @author KayKay modified by Boblemur
&lt;br /&gt;// @namespace kk.tools
&lt;br /&gt;// @version 1cm
&lt;br /&gt;// @include        &lt;a href=&quot;http://xhamster.com/movies/&quot;&gt;http://xhamster.com/movies/&lt;/a&gt;*
&lt;br /&gt;// @include        &lt;a href=&quot;http://www.xhamster.com/movies/&quot;&gt;http://www.xhamster.com/movies/&lt;/a&gt;*
&lt;br /&gt;// ==/UserScript==&lt;/p&gt;

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

&lt;p&gt;	}
&lt;br /&gt;    }
&lt;br /&gt;  }&lt;/p&gt;

&lt;p&gt;var pnl_qs = document.getElementById(&quot;voteProcessthank&quot;).parentNode.parentNode.lastChild.previousSibling.firstChild.nextSibling;
&lt;br /&gt;var pnl_dl = document.createElement(&quot;td&quot;);
&lt;br /&gt;var lnk_dl = document.createElement(&quot;a&quot;);
&lt;br /&gt;pnl_dl.style.fontSize = &quot;14px&quot;;
&lt;br /&gt;pnl_dl.appendChild(lnk_dl);
&lt;br /&gt;pnl_qs.appendChild(document.createElement(&quot;tr&quot;).appendChild(pnl_dl));&lt;/p&gt;

&lt;p&gt;lnk_dl.href = get_url();
&lt;br /&gt;lnk_dl.appendChild(document.createTextNode(&quot;Download this video(right click, save as)&quot;));&lt;/p&gt;

&lt;p&gt;will amend this problem.&lt;/p&gt;</body-html>
  <created-at type="datetime">2009-02-12T04:51:45Z</created-at>
  <forumable-id type="integer">28934</forumable-id>
  <forumable-type>Script</forumable-type>
  <id type="integer">95703</id>
  <topic-id type="integer">21663</topic-id>
  <updated-at type="datetime">2009-02-12T04:51:45Z</updated-at>
  <user-agent nil="true"></user-agent>
  <user-id type="integer">80533</user-id>
</post>
