diff options
author | Durand D'souza <durand1@gmail.com> | 2016-10-05 13:58:42 +0300 |
---|---|---|
committer | Durand D'souza <durand1@gmail.com> | 2016-10-05 13:58:42 +0300 |
commit | ecc11a8c4efd4947c9dcab59612d5ac032270c55 (patch) | |
tree | a5886240f6f98f9dc45c2d1bdf90b077b6363f0d /static | |
parent | 38ba174cb174f25b72cc20bbac72bc7787be5bf3 (diff) |
Added 404.html and basic support for ipfs.
Diffstat (limited to 'static')
-rw-r--r-- | static/js/ipfs.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/static/js/ipfs.js b/static/js/ipfs.js new file mode 100644 index 0000000..45d1947 --- /dev/null +++ b/static/js/ipfs.js @@ -0,0 +1,8 @@ +function use_ipfs(image) { + if (image.naturalWidth == 0 && image.src.search("/ipfs/") != -1) { + image.src = image.src.split('#')[1]; + } +} + +let image = document.getElementsByClassName("entry-image")[0].getElementsByTagName('img')[0]; +window.onload(use_ipfs(image)); |