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>
|
<p class="version">pandoc version <span id="version"></span></p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<script src="trypandoc.js?202208190901"></script>
|
<script src="trypandoc.js?202208191048"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -54,13 +54,14 @@ function paramsFromURL() {
|
||||||
function handleErrors(response) {
|
function handleErrors(response) {
|
||||||
if (response.status == 503) {
|
if (response.status == 503) {
|
||||||
throw Error("Conversion timed out.")
|
throw Error("Conversion timed out.")
|
||||||
} else if (!response.ok) {
|
// } else if (!response.ok) {
|
||||||
throw Error(response.statusText);
|
// throw Error(response.statusText);
|
||||||
}
|
}
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
function convert() {
|
function convert() {
|
||||||
|
document.getElementById("results").textContent = "";
|
||||||
let text = document.getElementById("text").value;
|
let text = document.getElementById("text").value;
|
||||||
let from = document.getElementById("from").value;
|
let from = document.getElementById("from").value;
|
||||||
let to = document.getElementById("to").value;
|
let to = document.getElementById("to").value;
|
||||||
|
@ -99,7 +100,7 @@ function convert() {
|
||||||
document.getElementById("permalink").href = permalink();
|
document.getElementById("permalink").href = permalink();
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
document.getElementById("results").textContent = error;
|
document.getElementById("results").textContent = error
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue