34 lines
1.4 KiB
PHP
34 lines
1.4 KiB
PHP
|
<?php include("../../header0.php")?>Tesses - Add To My TYTD<?php include("../../header1.php")?>
|
||
|
<div class="container">
|
||
|
|
||
|
<h1><a href="./"><-</a> Add To My TYTD</h1>
|
||
|
<form method="POST" action="download.php">
|
||
|
<div class="input-field col s6">
|
||
|
<input id="tytd_url" type="text" name="url" class="validate">
|
||
|
<input type="hidden" name="site" value="addtomydownloader.php">
|
||
|
<label for="tytd_url">YouTube URL</label>
|
||
|
</div>
|
||
|
<button class="btn waves-effect waves-light" type="submit" name="add"><i class="material-icons left">add</i>Add To My Downloader
|
||
|
|
||
|
</button>
|
||
|
</form>
|
||
|
<br>
|
||
|
<button class="btn waves-effect waves-light" onclick="dlvid();" name="dl"><i class="material-icons left">download</i>Download Video</button>
|
||
|
<a href="nojs.html" class="btn waves-effect waves-light" onclick="dlvid2();" name="dl2"><i class="material-icons left">link</i>Simple Version</a>
|
||
|
|
||
|
</div>
|
||
|
<script>
|
||
|
function yturl(url){
|
||
|
var p = /^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/;
|
||
|
|
||
|
url = (decodeURIComponent(url));
|
||
|
return (url.match(p)) ? RegExp.$1 : false ;
|
||
|
|
||
|
}
|
||
|
function dlvid()
|
||
|
{
|
||
|
window.location.href = 'https://stark-shelf-08981.herokuapp.com/Grabber/Video/' + yturl(document.getElementById('tytd_url').value);
|
||
|
}
|
||
|
|
||
|
</script>
|
||
|
<?php include("../../footer.php")?>
|