@@ -29,11 +29,6 @@ function newpage() {
2929 window.location.href = href.replace(/([?].*)?$/,"?" + $.param({text: input, from: from, to: to}));
3030};
3131
32−function process(res) {
33− $("#results").text(res.result);
34− $("#version").text(res.version);
35−}
36−
3732$(document).ready(function() {
3833 var text = $.QueryString["text"];
3934 $("#text").val(text);
@@ -42,8 +37,12 @@ $(document).ready(function() {
4237 var to = $.QueryString["to"] || "html";
4338 $("#to").val(to);
4439 if (text && text != "") {
45− $.getJSON("http://johnmacfarlane.net/cgi-bin/trypandoc", { from: from, to: to, text: text }, process);
46− $("#command").text("pandoc --from " + from + " --to " + to);
40+ $.getJSON("/cgi-bin/trypandoc", { from: from, to: to, text: text },
41+ function(res) {
42+ $("#results").text(res.result);
43+ $("#version").text(res.version);
44+ $("#command").text("pandoc --from " + from + " --to " + to);
45+ });
4746 };
4847 $("#convert").click(newpage);
4948});
@@ -58,13 +57,14 @@ $(document).ready(function() {
5857 footer { color: #555; text-align: center; margin: 1em; }
5958 p.version { color: #555; }
6059 button#convert { vertical-align: bottom; }
60+ pre#command { margin-top: 1em; background-color: transparent; border: none; }
6161 </style>
6262</head>
6363<body>
6464<div class="container">
6565 <div class="row">
6666 <div class="col-md-6">
67− <h1>Try <a href="http://johnmacfarlane.net/pandoc/">pandoc</a>!</h1>
67+ <h1>Try <a href="http://pandoc.org">pandoc</a>!</h1>
6868 </div>
6969 <div class="col-md-6">
7070 <pre id="command"></pre>