Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dldx/hpstr-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorDurand D'souza <durand1@gmail.com>2016-10-05 13:58:42 +0300
committerDurand D'souza <durand1@gmail.com>2016-10-05 13:58:42 +0300
commitecc11a8c4efd4947c9dcab59612d5ac032270c55 (patch)
treea5886240f6f98f9dc45c2d1bdf90b077b6363f0d /static
parent38ba174cb174f25b72cc20bbac72bc7787be5bf3 (diff)
Added 404.html and basic support for ipfs.
Diffstat (limited to 'static')
-rw-r--r--static/js/ipfs.js8
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));