diff --git a/pug/front.pug b/pug/front.pug new file mode 100644 index 0000000..b3bdcf8 --- /dev/null +++ b/pug/front.pug @@ -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=>{