Add pug/front.pug
This commit is contained in:
parent
b5f537c488
commit
747d299ec0
|
@ -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=>{
|
Loading…
Reference in New Issue