From 0dc5feb7f39043a8ba00bcad683f3907cad0bf96 Mon Sep 17 00:00:00 2001 From: Dillon Date: Mon, 24 Feb 2020 20:45:13 +0800 Subject: [PATCH] chore(lib): remove ls.native-loading --- assets/lib/lazysizes/ls.native-loading.min.js | 2 -- exampleSite/config.toml | 1 - layouts/partials/plugin/image.html | 2 -- layouts/partials/script.html | 5 ----- 4 files changed, 10 deletions(-) delete mode 100644 assets/lib/lazysizes/ls.native-loading.min.js diff --git a/assets/lib/lazysizes/ls.native-loading.min.js b/assets/lib/lazysizes/ls.native-loading.min.js deleted file mode 100644 index 9586fd93..00000000 --- a/assets/lib/lazysizes/ls.native-loading.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! lazysizes - v5.2.0 */ -!function(a,b){var c=function(){b(a.lazySizes),a.removeEventListener("lazyunveilread",c,!0)};b=b.bind(null,a,a.document),"object"==typeof module&&module.exports?b(require("lazysizes")):a.lazySizes?c():a.addEventListener("lazyunveilread",c,!0)}(window,function(a,b,c){"use strict";function d(){var d=c.loader,e=d.checkElems,f=function(){setTimeout(function(){a.removeEventListener("scroll",d._aLSL,!0)},1e3)},g="object"==typeof j.nativeLoading.disableListeners?j.nativeLoading.disableListeners:k;g.scroll&&(a.addEventListener("load",f),f(),a.removeEventListener("scroll",e,!0)),g.resize&&a.removeEventListener("resize",e,!0),Object.keys(g).forEach(function(a){g[a]&&b.removeEventListener(a,e,!0)})}function e(){h||(h=!0,f&&g&&j.nativeLoading.disableListeners&&(!0===j.nativeLoading.disableListeners&&(j.nativeLoading.setLoadingAttribute=!0),d()),j.nativeLoading.setLoadingAttribute&&a.addEventListener("lazybeforeunveil",function(a){var b=a.target;"loading"in b&&!b.getAttribute("loading")&&b.setAttribute("loading","lazy")},!0))}var f="loading"in HTMLImageElement.prototype,g="loading"in HTMLIFrameElement.prototype,h=!1,i=c.prematureUnveil,j=c.cfg,k={focus:1,mouseover:1,click:1,load:1,transitionend:1,animationend:1,scroll:1,resize:1};j.nativeLoading||(j.nativeLoading={}),a.addEventListener&&a.MutationObserver&&(f||g)&&(c.prematureUnveil=function(a){return h||e(),!(!("loading"in a&&(j.nativeLoading.setLoadingAttribute||a.getAttribute("loading")))||"auto"==a.getAttribute("data-sizes")&&!a.offsetWidth)||(i?i(a):void 0)})}); \ No newline at end of file diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 6852c2fb..b6a54669 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -525,7 +525,6 @@ enableEmoji = true sharerJS = '' # lazysizes@5.2.0 https://github.com/aFarkas/lazysizes lazysizesJS = '' - lazysizesNativeLoadingJS = '' # lightgallery@1.1.3 lg-thumbnail@1.1.0 lg-zoom@1.1.0 https://github.com/sachinchoolur/lightgallery.js lightgalleryCSS = '' lightgalleryJS = '' diff --git a/layouts/partials/plugin/image.html b/layouts/partials/plugin/image.html index b1749a6c..5d0a66db 100644 --- a/layouts/partials/plugin/image.html +++ b/layouts/partials/plugin/image.html @@ -14,7 +14,6 @@