editor technically works
This commit is contained in:
@@ -76,4 +76,23 @@
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function http(method, remote, callback, body, headers) {
|
||||
var xmlhttp = new XMLHttpRequest();
|
||||
xmlhttp.onreadystatechange = function() {
|
||||
if (xmlhttp.readyState == XMLHttpRequest.DONE) {
|
||||
callback(xmlhttp.responseText, xmlhttp.status, (key) => xmlhttp.getResponseHeader(key))
|
||||
}
|
||||
};
|
||||
xmlhttp.open(method, remote, true);
|
||||
if (typeof body == "undefined") {
|
||||
body = null
|
||||
}
|
||||
if (headers) {
|
||||
for (var key in headers)
|
||||
xmlhttp.setRequestHeader(key, headers[key])
|
||||
}
|
||||
xmlhttp.send(body);
|
||||
}
|
||||
</script>
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user