index/index.html

35 lines
785 B
HTML

<head>
<title>Click to Download</title>
<link rel="icon" type="image/x-icon" href="/images/favicon.png">
<script>
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
document.querySelector('html').onclick = function() {
document.title = 'Downloading...';
var video=document.getElementById('myVideo');
video.style.cursor = 'default';
video.play();
video.addEventListener('ended', function() {
document.title = 'Download complete!';
sleep(3000);
window.location.replace('http://youtube.com/endermanch');
});
}
</script>
<style>
video {
cursor: pointer;
}
</style>
</head>
<video nocontrols id="myVideo" height=100% width=100%>
<source src="/media/download.mp4" type="video/mp4">
</video>