git.iko.soy/typeable/pandoc
on master help sign in
trypandoc: Add standalone option to the command text (#6210)
349b5fdMike Tzou
trypandoc/index.html+8−5
@@ -9,9 +9,9 @@
9 <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
9 <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
10 <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
10 <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
11 <![endif]-->
11 <![endif]-->
12− <script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
12+ <script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
13− <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet">
13+ <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
14− <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
14+ <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
15 <script>
15 <script>
16"use strict";
16"use strict";
17(function($) { // http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values
17(function($) { // http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values
@@ -44,14 +44,17 @@ $(document).ready(function() {
44 $("#from").val(from);
44 $("#from").val(from);
45 var to = $.QueryString["to"] || "html";
45 var to = $.QueryString["to"] || "html";
46 $("#to").val(to);
46 $("#to").val(to);
47− var standalone = ($.QueryString["standalone"] === "1") ? "1" : "0"
47+ var standalone = ($.QueryString["standalone"] === "1") ? "1" : "0";
48 $("#standalone").prop('checked', (standalone === "1"));
48 $("#standalone").prop('checked', (standalone === "1"));
49 if (text && text != "") {
49 if (text && text != "") {
50 $.getJSON("/cgi-bin/trypandoc", { from: from, to: to, text: text, standalone: standalone },
50 $.getJSON("/cgi-bin/trypandoc", { from: from, to: to, text: text, standalone: standalone },
51 function(res) {
51 function(res) {
52 $("#results").text(res.html);
52 $("#results").text(res.html);
53 $("#version").text(res.version);
53 $("#version").text(res.version);
54+ var commandString = "pandoc"
55+ + ((standalone === "1") ? " --standalone" : "")
56+ + " --from " + from + " --to " + to;
54− $("#command").text("pandoc --from " + from + " --to " + to);
57+ $("#command").text(commandString);
55 });
58 });
56 };
59 };
57 $("#convert").click(newpage);
60 $("#convert").click(newpage);