chore(lib): remove ls.native-loading

This commit is contained in:
Dillon 2020-02-24 20:45:13 +08:00
parent 7e56922f82
commit 0dc5feb7f3
4 changed files with 0 additions and 10 deletions

View file

@ -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)})});

View file

@ -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 = ''

View file

@ -14,7 +14,6 @@
<a class="lightgallery" href="{{ $large | safeURL }}" title="{{ $description }}" data-thumbnail="{{ $small | safeURL }}"{{ if $title }} data-sub-html="<h2>{{ $title }}</h2><p>{{ $description }}</p>"{{ end }}>
<img
class="lazyload"
loading="lazy"
src="{{ $loading.RelPermalink | safeURL }}"
data-sizes="auto"
data-srcset="{{ $small | safeURL }}, {{ $src | safeURL }} 1.5x, {{ $large | safeURL }} 2x"
@ -25,7 +24,6 @@
{{- else -}}
<img
class="lazyload"
loading="lazy"
src="{{ $loading.RelPermalink | safeURL }}"
data-sizes="auto"
data-srcset="{{ $small | safeURL }}, {{ $src | safeURL }} 1.5x, {{ $large | safeURL }} 2x"

View file

@ -34,11 +34,6 @@
{{- else -}}
{{- slice "lib/lazysizes/lazysizes.min.js" | $scratch.Add "scriptLocal" -}}
{{- end -}}
{{- with $CDN.lazysizesNativeLoadingJS -}}
{{- slice . | $scratch.Add "scriptCDN" -}}
{{- else -}}
{{- slice "lib/lazysizes/ls.native-loading.min.js" | $scratch.Add "scriptLocal" -}}
{{- end -}}
{{- end -}}
{{- /* lightgallery.js */ -}}