first draft of first chapter

This commit is contained in:
Carl Fredrik Samson
2020-01-25 21:28:37 +01:00
parent bb6d1749c4
commit dd4921d634
27 changed files with 428 additions and 3466 deletions

View File

@@ -180,6 +180,21 @@
</div>
<!-- Livereload script (if served using the cli tool) -->
<script type="text/javascript">
var socket = new WebSocket("ws://localhost:3001");
socket.onmessage = function (event) {
if (event.data === "reload") {
socket.close();
location.reload(true); // force reload from server (not from cache)
}
};
window.onbeforeunload = function() {
socket.close();
}
</script>