Файловый менеджер - Редактировать - /home/kunzqhe/www/wp-content/themes/themify-ultra/themify/js/themify.gallery.min.js
Назад
'use strict';(function(d,g,k,l){const p={origHash:null,config:{},init(a){this.config=a;this.initLightbox();this.openAnchor()},lightboxSelector(a){a.preventDefault();a.stopImmediatePropagation();if(!d(".mfp-wrap.mfp-gallery").length){var b=d(this),c=b.find("> a");c=0===c.length?b.attr("href"):c.attr("href");var e=p,f=e.getFileType(c);a=e.isVideo(c);var r=g.parseVideo(c),t={},h=b.parents(".swiper-container");var m=0<h.length?"inline"===f||"iframe"===f?[]:b.data("rel")?d('a[data-rel="'+b.data("rel")+ '"]'):h.find(".swiper-slide:not(.swiper-slide-duplicate) .themify_lightbox img").parents(".themify_lightbox"):"inline"===f||"iframe"===f?[]:b.data("rel")?d('a[data-rel="'+b.data("rel")+'"]'):b.closest(".themify_builder_content>.module_row, .loops-wrapper, .gallery-wrapper").find(".themify_lightbox img").parents(".themify_lightbox");var q=0<h.length&&h[0].swiper?h[0].swiper.realIndex:1<m.length?m.index(this):0;h=a?"100%":e.getParam("width",c)?e.getParam("width",c):"94%";var u=a?"100%":e.getParam("height", c)?e.getParam("height",c):"100%";-1===h.indexOf("%")&&(h+="px");-1===u.indexOf("%")&&(u+="px");if(!0===a&&("youtube"===r.type||"vimeo"===r.type)){const a=e.getCustomParams(c);a&&("youtube"===r.type?(t.youtube={id:"v=",index:"youtube.com/",src:"//www.youtube.com/embed/%id%"+a},c=e.getYoutubePath(c)):(t.vimeo={id:"/",index:"vimeo.com/",src:"//player.vimeo.com/video/%id%"+a},c=c.split("?")[0]))}if(1<m.length&&-1!==q){jQuery.uniqueSort(m);var n=[];m.each(function(a,b){a=d(b).find("img");let c=b.dataset.t? b.dataset.t:a.prop("title");c=""!==c?c:a.prop("alt");c="undefined"!==typeof c&&""!==c?c:b.getAttribute("title");n.push({src:e.getiFrameLink(d(b).prop("href")),title:c?c:"",type:e.getFileType(d(b).prop("href"))})});n=n.reduce(function(a,b){0===a.filter(function(a){return b.src===a.src}).length&&(b.src===c&&(q=a.length),a.push(b));return a},[])}else q=0,n={src:e.getiFrameLink(c),title:"undefined"!==typeof d(this).children("img").prop("alt")?d(this).children("img").prop("alt"):d(this).prop("title")}; g.isTouch&&!l.MSStream&&/iPad|iPhone|iPod/.test(navigator.userAgent);f={items:n,type:f,image:{markup:e.getImageMarkup(this)},iframe:{markup:'<div class="mfp-iframe-scaler" style="max-width: '+h+" !important; height: "+u+';"><div role="button" tabindex="0" class="tf_close mfp-close"></div><div class="mfp-iframe-wrapper"><iframe class="mfp-iframe" noresize="noresize" frameborder="0" allowfullscreen></iframe></div>'+e.getSocialMarkup()+"</div>",patterns:t},callbacks:{beforeOpen:function(){k.body.classList.add("themify_mp_opened")}, open:function(){e.updateHash("open",this);e.openSharing(this);let a=b.data("zoom-config"),c={};a&&(a=a.split("|"),a[0]&&(c.width=a[0]),"undefined"!==typeof a[1]&&(c.height=a[1]),d(this.content).parent().css(c))},change:function(){e.updateHash("open",this)},close:function(){e.updateHash("close")},afterClose:function(){k.body.classList.remove("themify_mp_opened")}}};1<m.length&&d.extend(f,{gallery:{enabled:!0,tCounter:e.config.i18n?e.config.i18n.tCounter:""}});0<b.find("img").length&&d.extend(f,{mainClass:"mfp-with-zoom", zoom:{enabled:!g.isTouch,duration:300,easing:"ease-in-out",opener:function(){return b.find("img")}}});f.mainClass=f.mainClass?f.mainClass:"";f.mainClass+=a?" video-frame":" standard-frame";f.fixedContentPos=!0;e.isInIframe()?l.parent.jQuery.magnificPopup.open(f):d.magnificPopup.open(f,q)}},gallerySelector(a){const b=p;if("image"===b.getFileType(d(this).prop("href"))){a.preventDefault();a.stopImmediatePropagation();var c=d(b.config.gallerySelector,d(this).closest(".module, .gallery, .gallery-wrapper")), e=[];c.each(function(){var a=d(this).prop("title");a=""!==a?a:"undefined"!==typeof d(this).children("img").prop("alt")?d(this).children("img").prop("alt"):"";0<d(this).parent().next(".gallery-caption").length?a=d(this).parent().next(".wp-caption-text").html():0<d(this).find(".gallery-caption").find(".entry-content").length&&(a=d(this).find(".gallery-caption").find(".entry-content").text());e.push({src:d(this).prop("href"),title:a,type:"image"})});a={gallery:{enabled:!0},image:{markup:b.getImageMarkup(this)}, items:e,mainClass:"mfp-with-zoom",zoom:{enabled:!g.isTouch,duration:300,easing:"ease-in-out",opener:function(a){a=d(c[a.index]);return a.is("img")?a:a.find("img")}},callbacks:{open:function(){b.updateHash("open",this);b.openSharing(this)},change:function(){b.updateHash("open",this)},close:function(){b.updateHash("close")}}};b.isInIframe()?l.parent.jQuery.magnificPopup.open(a,c.index(this)):d.magnificPopup.open(a,c.index(this))}},contentImagesAreas(a){const b=p;if("image"===b.getFileType(this.getAttribute("href"))&& d(this).closest(b.config.contentImagesAreas)){a.preventDefault();a.stopImmediatePropagation();const c=d(this);a={items:{src:c.prop("href"),title:0<c.next(".wp-caption-text").length?c.next(".wp-caption-text").html():c.children("img").prop("alt")},image:{markup:b.getImageMarkup(this)},type:"image",callbacks:{open:function(){b.updateHash("open",this);b.openSharing(this)},change:function(){b.updateHash("open",this)},close:function(){b.updateHash("close")}}};0<c.find("img").length&&d.extend(a,{mainClass:"mfp-with-zoom", zoom:{enabled:!g.isTouch,duration:300,easing:"ease-in-out",opener:function(){return c.find("img")}}});b.isInIframe()?l.parent.jQuery.magnificPopup.open(a):d.magnificPopup.open(a)}},initLightbox(){g.body.off("click",this.config.lightboxSelector,this.lightboxSelector).on("click",this.config.lightboxSelector,this.lightboxSelector);if(this.config.gallerySelector)g.body.off("click",this.config.gallerySelector,this.gallerySelector).on("click",this.config.gallerySelector,this.gallerySelector);if(this.config.contentImagesAreas)g.body.off("click", ".post-content a",this.contentImagesAreas).on("click",".post-content a",this.contentImagesAreas)},isInIframe(){return this.config.extraLightboxArgs&&this.config.extraLightboxArgs.displayIframeContentsInParent},getFileType(a){return a.match(/\.(gif|jpg|jpeg|tiff|png|webp|apng)(\?fit=\d+(,|%2C)\d+)?(&ssl=\d+)?$/i)?"image":a.match(/\bajax=true\b/i)?"ajax":"#"===a.substr(0,1)?"inline":"iframe"},isVideo(a){return this.isYoutube(a)||this.isVimeo(a)||a.match(/\b.mov\b/i)||a.match(/\b.swf\b/i)},isYoutube(a){return"youtube"=== g.parseVideo(a).type},isVimeo(a){return"vimeo"===g.parseVideo(a).type},getYoutubePath(a){return"//youtube.com/watch?v="+(a.match(/youtu\.be/i)?a.match(/youtu\.be\/([^\?]*)/i)[1]:this.getParam("v",a))},getiFrameLink(a){"iframe"===this.getFileType(a)&&null===this.isVideo(a)&&(g.parseVideo(a),a=g.UpdateQueryString("iframe","true",a));return a},getParam(a,b){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");a=(new RegExp("[\\?&]"+a+"=([^&#]*)")).exec(b);return null==a?"":a[1]},getCustomParams(a){a=(a=a.split("?")[1])? "&"+a.replace(/[\\?&]?(v|autoplay)=[^&#]*/g,"").replace(/^&/g,""):"";return"?autoplay=1"+a},openSharing(a){if(!this.config.disableSharing){var b=a.content[0].getElementsByClassName("tf_social_sharing")[0];b&&b.addEventListener("click",function(b){b.preventDefault();g.sharer(b.target.dataset.type,a.currItem.data.src.replace("?iframe=true",""),a.currItem.data.title)})}},updateHash(a,b){"open"===a?(null===this.origHash&&(this.origHash=l.location.hash),a=b.currItem.data.title,b=k.createElement("div"), b.innerHTML=a,a=b.textContent.trim(),""!==a&&this._updateHash(a)):(this._updateHash(this.origHash),this.origHash=null)},_updateHash(a){"#"!==(""+a).charAt(0)&&(a="#"+a);history.replaceState("","",a)},openAnchor(){if(""!==l.location.hash){let a=decodeURI(l.location.hash.substring(1)),b=k.querySelector('[alt="'+a+'"]');b=null===b?k.querySelector('[title="'+a+'"]'):b;null!==b&&b.click()}},getIcon(a){a="tf-"+a.trim().replace(" ","-");const b=k.createElementNS("http://www.w3.org/2000/svg","use"),c=k.createElementNS("http://www.w3.org/2000/svg", "svg");c.setAttribute("class","tf_fa "+a);b.setAttributeNS(null,"href","#"+a);c.appendChild(b);return c},getSocialMarkup(){if(this.config.disableSharing)return"";g.fontAwesome(["ti-facebook","ti-twitter-alt","ti-pinterest","ti-email"]);return'<div class="tf_social_sharing"><a href="#" data-type="facebook">'+this.getIcon("ti-facebook").outerHTML+'</a><a href="#" data-type="twitter">'+this.getIcon("ti-twitter-alt").outerHTML+'</a><a href="#" data-type="pinterest">'+this.getIcon("ti-pinterest").outerHTML+ '</a><a href="#" data-type="email">'+this.getIcon("ti-email").outerHTML+"</a></div>"},getImageMarkup(a){return'<div class="mfp-figure"><div role="button" tabindex="0" class="tf_close mfp-close"></div><div class="mfp-counter"></div><div class="mfp-img"></div><div class="mfp-bottom-bar">'+("no"!==a.dataset.title?'<div class="mfp-title"></div>':"")+this.getSocialMarkup()+"</div></div>"}};g.on("tf_gallery_init",function(a){p.init(a)})})(jQuery,Themify,document,window);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка