| <script> | |
| const params = new URLSearchParams(location.search); | |
| const worker = new Worker(params.get('script')); | |
| worker.onmessage = e => { | |
| document.body.innerText += e.data; | |
| document.title = 'DONE'; | |
| }; | |
| function fetch_from_worker(url) { | |
| document.title = 'Fetching'; | |
| document.body.innerText = ''; | |
| worker.postMessage({url: url}); | |
| } | |
| </script> |