File Editor
Directories:
.. (Back)
Files:
brightcove.min.asset.php
brightcove.min.js
jmpress.min.asset.php
jmpress.min.js
jmpress.min.js.LICENSE.txt
main.min.asset.php
main.min.js
quiz.min.asset.php
quiz.min.js
recipes-printthis.min.asset.php
recipes-printthis.min.js
recipes-printthis.min.js.LICENSE.txt
recipes.min.asset.php
recipes.min.js
slideshow-shortcode.min.asset.php
slideshow-shortcode.min.js
Create New File
Create
Edit File: slideshow-shortcode.min.js
(()=>{function e(e,t,i){this.element=e,this.images=[],this.controls={},this.transition=t||"fade",this.autostart=i}e.prototype.showLoadingImage=function(e){if(e){this.loadingImage_=document.createElement("div"),this.loadingImage_.className="jetpack-slideshow-loading";var t=document.createElement("img");t.src=jetpackSlideshowSettings.spinner,this.loadingImage_.appendChild(t),this.loadingImage_.appendChild(this.makeZeroWidthSpan()),this.element.append(this.loadingImage_)}else this.loadingImage_&&(this.loadingImage_.parentNode.removeChild(this.loadingImage_),this.loadingImage_=null)},e.prototype.init=function(){this.showLoadingImage(!0);for(var e=this,t=0;t<this.images.length;t++){var i=this.images[t],s=document.createElement("img");s.src=i.src,s.title=void 0!==i.title?i.title:"",s.alt=void 0!==i.alt?i.alt:"",s.setAttribute("itemprop","image"),s.nopin="nopin";var n=document.createElement("div");n.className="jetpack-slideshow-slide-caption",n.setAttribute("itemprop","caption description"),n.innerHTML=i.caption;var o=document.createElement("div");o.className="jetpack-slideshow-slide",o.setAttribute("itemprop","associatedMedia"),o.setAttribute("itemscope",""),o.setAttribute("itemtype","https://schema.org/ImageObject"),0===t&&(s.complete?setTimeout((function(){e.finishInit_()}),1):s.addEventListener("load",(function(){e.finishInit_()}))),o.appendChild(s),s.removeAttribute("width"),s.removeAttribute("height"),o.appendChild(this.makeZeroWidthSpan()),o.appendChild(n),this.element.append(o)}},e.prototype.makeZeroWidthSpan=function(){var e=document.createElement("span");return e.className="jetpack-slideshow-line-height-hack",-1!==window.navigator.userAgent.indexOf("MSIE ")?e.appendChild(document.createTextNode(" ")):e.innerHTML=" ",e},e.prototype.finishInit_=function(){this.showLoadingImage(!1),this.renderControls_();var e=this;if(this.images.length>1){jQuery(this.element).cycle({fx:this.transition,prev:this.controls.prev,next:this.controls.next,timeout:jetpackSlideshowSettings.speed,slideExpr:".jetpack-slideshow-slide",onPrevNextEvent:function(){return e.onCyclePrevNextClick_.apply(e,arguments)}});var t=this.element;this.autostart||(jQuery(t).cycle("pause"),this.controls.stop.classList.remove("running"),this.controls.stop.classList.add("paused")),this.controls.stop.addEventListener("click",(function(e){var i=e.currentTarget;i===e.target&&(e.preventDefault(),i.classList.contains("paused")?(i.classList.add("running"),i.classList.remove("paused"),jQuery(t).cycle("resume",!0)):(jQuery(t).cycle("pause"),i.classList.remove("running"),i.classList.add("paused")))}))}else this.element.children(":first").show(),this.element.css("position","relative");this.initialized_=!0},e.prototype.renderControls_=function(){if(!this.controlsDiv_){var e=document.createElement("div");e.className="jetpack-slideshow-controls";for(var t=["prev","stop","next"],i=0;i<t.length;i++){var s=t[i],n="label_"+s,o=document.createElement("a");o.href="#",o.className="button-"+s,o.setAttribute("aria-label",jetpackSlideshowSettings[n]),o.setAttribute("role","button"),e.appendChild(o),this.controls[s]=o}this.element.append(e),this.controlsDiv_=e}},e.prototype.onCyclePrevNextClick_=function(e,t){if(jetpackSlideshowSettings.blog_id){var i=this.images[t].id;(new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?host="+encodeURIComponent(document.location.host)+"&rand="+Math.random()+"&blog="+jetpackSlideshowSettings.blog_id+"&subd="+jetpackSlideshowSettings.blog_subdomain+"&user_id="+jetpackSlideshowSettings.user_id+"&post="+i+"&ref="+encodeURIComponent(document.location)}},function(){function t(){document.querySelectorAll(".jetpack-slideshow-noscript").forEach((function(e){e.remove()})),document.querySelectorAll(".jetpack-slideshow").forEach((function(t){if("true"!==t.dataset.processed){var i=t.dataset.trans,s="true"===t.dataset.autostart,n=JSON.parse(t.dataset.gallery||"[]"),o=new e(t,i,s);o.images=n,o.init(),t.dataset.processed="true"}}))}document.addEventListener("DOMContentLoaded",t),document.body.addEventListener("post-load",t)}()})();
Save Changes
Rename File
Rename