Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
28 lines (26 sloc) 891 Bytes
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="/node_modules/docter/ghf_marked.css" />
<script src="/socket.io/socket.io.js"></script>
<script>
var socket = io.connect('http://localhost:8090/');
socket.on('connect', function () {
socket.on('newContent', function(newHTML) {
document.body.innerHTML = newHTML;
});
socket.on('die', function(newHTML) {
window.open('', '_self', '');
window.close();
var firefoxWarning =
"<h1>Oops!</h1>" +
"<h3>Firefox doesn't allow windows to self-close.</h3>" +
"<h3>If you want the preview window to close automatically like in other browsers, go to about:config and set dom.allow_scripts_to_close_windows to true.</h3>"
document.body.innerHTML = firefoxWarning;
});
});
</script>
</head>
<body>
</body>
</html>