Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 27 lines (26 sloc) 0.891 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
<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>
Something went wrong with that request. Please try again.