Update and clean up HTML files, upgrade structure
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
const redirect = 'https://go.enderman.ch/youtube';
|
||||
let video = document.querySelector('#player');
|
||||
|
||||
async function sleep(ms) {
|
||||
await new Promise(resolve => setTimeout(resolve, ms));
|
||||
}
|
||||
|
||||
document.querySelector('.fullscreen').onclick = () => {
|
||||
document.title = 'Downloading...';
|
||||
|
||||
video.style.cursor = 'default';
|
||||
video.play();
|
||||
}
|
||||
|
||||
video.addEventListener('ended', async () => {
|
||||
document.title = 'Download complete!';
|
||||
|
||||
await sleep(3000);
|
||||
window.location.replace(redirect);
|
||||
});
|
||||
Reference in New Issue
Block a user