<!DOCTYPE html>
<html>

<head>
    <script src="/static/showdown/showdown.js"></script>
</head>

<body>
    <div id="doc"></div>
    <script>
        var xhr = new XMLHttpRequest();
        processURL = window.location.href;

        xhr.open("get", processURL + "&get=true", false);
        xhr.send(null);
        if (xhr.status == 200) {
            resp = xhr.responseText;
        } else {
            alert("Err: Document not available.")
        }

        var converter = new showdown.Converter();
        var html = converter.makeHtml(resp);
        document.getElementById('doc').innerHTML = html;
    </script>
</body>

</html>