bfs_demo/pug/front.pug

27 lines
635 B
Plaintext
Raw Permalink Normal View History

2025-02-13 20:16:50 -05:00
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=>{