filesafe/dist/js/album.js

3 lines
933 B
JavaScript

var lsKeys={},page={lazyLoad:null,lightbox:null,lightboxExts:[".gif",".jpeg",".jpg",".png",".svg",".tif",".tiff",".webp",".bmp"]};window.addEventListener("DOMContentLoaded",(function(){for(var e=document.querySelectorAll(".image-container"),t=0;t<e.length;t++){var a=e[t].querySelector(".details .file-size");if(a){var i=a.dataset.value||a.innerHTML.replace(/\s*B$/i,"");a.innerHTML=page.getPrettyBytes(parseInt(i))}var n=e[t].querySelector(".details .file-date");if(n){var o=n.dataset.value;n.innerHTML=page.getPrettyDate(new Date(1e3*parseInt(o)))}}page.lazyLoad=new LazyLoad;var l=new RegExp(""+page.lightboxExts.map((function(e){return e.substring(1)})).join("|"),"i");console.log(l),page.lightbox=new SimpleLightbox("#table a.image",{captions:!0,captionSelector:"img",captionType:"attr",captionsData:"alt",captionPosition:"bottom",captionDelay:500,fileExt:l,preloading:!1,uniqueImages:!1})}));
//# sourceMappingURL=album.js.map