More trypandoc improvements.
This commit is contained in:
parent
e9bfa94e18
commit
e483bc9ff7
2 changed files with 5 additions and 4 deletions
|
@ -175,7 +175,7 @@
|
|||
<p class="version">pandoc version <span id="version"></span></p>
|
||||
</footer>
|
||||
|
||||
<script src="trypandoc.js?202208190901"></script>
|
||||
<script src="trypandoc.js?202208191048"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -54,13 +54,14 @@ function paramsFromURL() {
|
|||
function handleErrors(response) {
|
||||
if (response.status == 503) {
|
||||
throw Error("Conversion timed out.")
|
||||
} else if (!response.ok) {
|
||||
throw Error(response.statusText);
|
||||
// } else if (!response.ok) {
|
||||
// throw Error(response.statusText);
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
function convert() {
|
||||
document.getElementById("results").textContent = "";
|
||||
let text = document.getElementById("text").value;
|
||||
let from = document.getElementById("from").value;
|
||||
let to = document.getElementById("to").value;
|
||||
|
@ -99,7 +100,7 @@ function convert() {
|
|||
document.getElementById("permalink").href = permalink();
|
||||
})
|
||||
.catch(error => {
|
||||
document.getElementById("results").textContent = error;
|
||||
document.getElementById("results").textContent = error
|
||||
}
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue