All pastes #948651 Raw Edit

Mine

public text v1 · immutable
·published 2008-03-19 10:49 UTC
rendered paste body
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<script type="text/javascript" src="./js/prototype.js"></script>
<link href="./css/style.css" media="screen" rel="Stylesheet" type="text/css" />
<title>YouTube Downloader</title>
<script type="text/javascript">
function getLink() {
    var url = $('url').value;
    if (!url.match(/\?v=([^&]+)/)) return;

    var id = RegExp.$1;

    Element.hide('loader');
    Element.hide('link_block');
    Element.show('loading');

    var url  = 'http://86.63.83.54/youtube/index.php';
    var pars = 'id='+id+'&redirect=1';
    new Ajax.Request(url, {parameters:pars, onComplete:
        function(r) {
            var url = r.responseText;
            Element.hide('loading');
            Element.show('link_block');
            if ('' == url) {
                $('link').innerHTML = 'Failure: cannot get download url...';
            } else {
                $('link').innerHTML = '<a href="'+url+'">'+url+'</a>';
            }
        }
    });
}
function reset() {
    Element.hide('loader');
    Element.hide('link_block');
    Element.hide('loading');
    Element.hide('help');
    $('url').value = '';
    $('url').focus();
}
function bodyOnLoad() {
    $('url').focus();
    var url = '';
    if ('' != url) {
        $('url').value = url;
        getLink();
    }
    new Form.Element.Observer('url', 1, onURLChanged);
}
function onURLChanged() {
    var url = $('url').value;
    var id = getVideoID(url);
    if ('' != id) {
        Element.show('loader');
    } else {
        Element.hide('loader');
    }
}
function getVideoID(url) {
    if (url.match(/\?v=([^&]+)/)) return RegExp.$1;
    return '';
}
</script>
</head>
<body onload="bodyOnLoad();">

<div id="container">

<h1>YouTube Downloader</h1><form onsubmit="getLink(); return false;">
<dl>
<dt><label for="url">Video URL</label></dt>
<dd>
<p class="form_box"><input type="text" id="url" name="url" size="64" /></p>
<p class="form_box example">example: <a href="http://www.youtube.com/watch?v=4JiacBPZA7Y">http://www.youtube.com/watch?v=4JiacBPZA7Y</a></p>
<p class="form_box">
<div id="loader" style="display:none;"><a href="javascript:getLink();">Get Download URL</a></div>
</p>
<div id="loading" style="display:none;">
<img src="./images/spinner.gif" />

</div>
</dd>
</dl>
</form>

<div id="link_block" style="display:none;">
<dl>
<dt>Download URL</dt>
<dd>
<div id="link"></div>
<div id="reset">
<a href="javascript:reset();">Clear</a>
</div>
</dd>
</dl>

</div>

<div><a href="javascript:Element.toggle('help');" class="help">Help / Source</a></div>

<div id="help" style="display:none;">
<dl>
<dt>How to download video</dt>
<dd>
<ol>
<li>1) Enter the YouTube Video URL</li>
<li>2) Click "Get Download URL"</li>
<li>3) Right click "Download URL"</li>

<li>4) Save target as "*.flv"</li>
</ol>
</dd>
<dt>FLV Player</dt>
<dd>
<ul>
<li><a href="http://www.google.com/search?q=flv+player">Google: "flv player"</a></li>
<li><a href="http://qooqle.jp/?q=flv+player">Qooqle: "flv player"</a></li>
</ul>
</dd>
<dt>Bookmarklet</dt>
<dd>

<a href="javascript:var u=document.location.href;if(u.match(/\?v=([^&]+)/)){location.href='http://86.63.83.54/youtube/index.php?v='+RegExp.$1;}else{alert('can\'t get video id');}">Save This Video</a> <span class="explain">(bookmark this link)</span>
</dd>
</dl>
</div>

<div id="footer">
<div class="qooqle_link"><a href="http://sinferno.silk.com/">Sinferno: A place for All-Rounders!</a></div>

</div>

</div>

</body>

</html>