Add pug/front.pug

This commit is contained in:
x0x7 2025-02-13 20:16:50 -05:00
parent b5f537c488
commit 747d299ec0
1 changed files with 26 additions and 0 deletions

26
pug/front.pug Normal file
View File

@ -0,0 +1,26 @@
doctype html
html
head
body
input#url(placeholder = 'URL to grab')
button#send Pull
#downloaded
#todownload
script.
var ws=null;
function ensurews() {
if(ws) return ws;
ws = new WebSocket('ws://localhost:8080');
return ws;
}
var urlElem = document.querySelector('#url')
var sendElem = document.querySelector('#send')
var downloadedElem = document.querySelector('#downloaded')
var todownloadElem = document.querySelector('#todownload')
sendElem.addEventListener('click',()=>{
});
function timeout(ms) {
return new Promise(r=>setTimeout(r,ms));
}
ws.on('message',event=>{