<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>sources</title> </head><body> <script> function httpGet(URL,handler){ fetch(URL).then(_=>_.text()).then(handler) } </script> <h1>sources</h1> <a class="href-content">https://docs.google.com/document/d/1e0Iia3aRxMqqkipyWArT5rMIKVrUOQjCO6peSY6h984</a> <script>for(var link of document.querySelectorAll('a.href-content')) link.href=link.textContent </script> <pre id="toc"></pre> <hr> <pre id="display"></pre> <script> var files=['01.c', '01.lua', '02.c', '02.lua', '03.c', '03.lua'] var fileID=0 if(location.hash=="") location.hash = "#_" for(var file of files){ var htmlAnchor = file var header="<h2><a href='"+file+"'>"+file+"</a> <a href='#"+ htmlAnchor +"'># link</a> </h2>" toc.innerHTML += header display.innerHTML += header + "<div id='" + htmlAnchor + "'>"+ "<b>#"+htmlAnchor+"</b>\n\n" +"</div>" function getClosure(id){ return text=>{ document.getElementById(id).innerHTML += text location = location // anchor now effective } } httpGet(file, getClosure( htmlAnchor ) ) fileID++ } </script> <script src="/web/show-source.js"></script> </body></html>