Remove remnants of ipfs

This commit is contained in:
Mats Rauhala 2019-06-04 22:25:04 +03:00
parent 7557f5041c
commit b93aab5742
4 changed files with 0 additions and 38 deletions

View File

@ -1,22 +0,0 @@
var getApiIpfsCurrent = function(onSuccess, onError) {
var xhr = new XMLHttpRequest();
xhr.open('GET', '/api/ipfs/current', true);
xhr.setRequestHeader('Accept', 'application/json');
xhr.onreadystatechange = function () {
var res = null;
if (xhr.readyState === 4) {
if (xhr.status === 204 || xhr.status === 205) {
onSuccess();
} else if (xhr.status >= 200 && xhr.status < 300) {
try { res = JSON.parse(xhr.responseText); } catch (e) { onError(e); }
if (res) onSuccess(res);
} else {
try { res = JSON.parse(xhr.responseText); } catch (e) { onError(e); }
if (res) onError(res);
}
}
};
xhr.send(null);
};

View File

@ -1,10 +0,0 @@
$(document).ready(function() {
var success = function(x) {
$("#ipfs > em").html(x);
};
var error = function(x) {
$("#ipfs").hide();
console.log("ipfs hash not found: " + x);
};
getApiIpfsCurrent(success, error);
});

File diff suppressed because one or more lines are too long

View File

@ -29,10 +29,6 @@
<footer>
Site proudly generated by
<a href="http://jaspervdj.be/hakyll">Hakyll</a>
<span id="ipfs">and found on IPFS as <em></em></ipfs>
</footer>
</body>
<script type="application/javascript" src="/js/jquery-3.3.1.min.js"></script>
<script type="application/javascript" src="/js/api.js"></script>
<script type="application/javascript" src="/js/app.js"></script>
</html>