« get me outta code hell

more lazy loading tweaks - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/static/lazy-fallback.js
diff options
context:
space:
mode:
author(quasar) nebula <towerofnix@gmail.com>2020-12-10 17:58:36 -0400
committer(quasar) nebula <towerofnix@gmail.com>2020-12-10 17:58:51 -0400
commitd42c5dfc610a1953f798f87a0b8861d8fa5dca9d (patch)
treed3337f804b78b2995f64ff4a14566ad4c7236a3d /static/lazy-fallback.js
parent56298f4a826882abcf6f1065ebca7c6490f7e622 (diff)
more lazy loading tweaks
Diffstat (limited to 'static/lazy-fallback.js')
-rw-r--r--static/lazy-fallback.js19
1 files changed, 0 insertions, 19 deletions
diff --git a/static/lazy-fallback.js b/static/lazy-fallback.js
deleted file mode 100644
index a66b922c..00000000
--- a/static/lazy-fallback.js
+++ /dev/null
@@ -1,19 +0,0 @@
-// Fall8ack code for lazy loading. 8asically, this runs if the stuff in
-// lazy-loading.js doesn't; while that file's written with the same kinda
-// modern syntax/APIs used all over the site, displaying the images is a pretty
-// damn important thing to do, so we have this goodol' Olde JavaScripte fix for
-// 8rowsers which have JS ena8led (and so won't display gener8ted <noscript>
-// tags) 8ut don't support what we use for lazy loading.
-
-if (!window.lazyLoadingExecuted) {
-    lazyLoadingFallback();
-}
-
-function lazyLoadingFallback() {
-    var lazyElements = document.getElementsByClassName('lazy');
-    for (var i = 0; i < lazyElements.length; i++) {
-        var element = lazyElements[i];
-        var original = element.getAttribute('data-original');
-        element.setAttribute('src', original);
-    }
-}