PluginProbe ʕ •ᴥ•ʔ
Strong Testimonials / 3.3.2
Strong Testimonials v3.3.2
3.3.2 3.3.1 trunk 1.0.1 2.30.9 2.31.10 2.32 2.32.1 2.32.2 2.32.3 2.32.4 2.33 2.34 2.35 2.36 2.37 2.38 2.38.1 2.39 2.39.1 2.39.2 2.39.3 2.40.0 2.40.1 2.40.2 2.40.3 2.40.4 2.40.5 2.40.6 2.40.7 2.41.0 2.41.1 2.50.0 2.50.1 2.50.2 2.50.3 2.50.4 2.51.0 2.51.1 2.51.2 2.51.3 2.51.4 2.51.5 2.51.6 2.51.7 2.51.8 2.51.9 3.0.0 3.0.1 3.0.2 3.0.3 3.1.0 3.1.1 3.1.10 3.1.11 3.1.12 3.1.13 3.1.14 3.1.15 3.1.16 3.1.17 3.1.18 3.1.19 3.1.2 3.1.20 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.10 3.2.11 3.2.12 3.2.13 3.2.14 3.2.15 3.2.16 3.2.17 3.2.18 3.2.19 3.2.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8 3.2.9 3.3.0
strong-testimonials / assets / public / js / controller.min.js
strong-testimonials / assets / public / js Last commit date
lib 10 months ago controller.js 1 year ago controller.min.js 1 year ago
controller.min.js
1 lines
1 "use strict";var debugit=!1,strongController={grids:{},iframes:{},defaults:{initializeOn:"windowLoad",method:"",universalTimer:500,observerTimer:500,containerId:"page",addedNodeId:"content",event:"",script:"",debug:!1},config:{},setup:function(t){t.universalTimer=parseInt(t.universalTimer),t.observerTimer=parseInt(t.observerTimer),t.debug=!!t.debug,debugit=t.debug,this.config=jQuery.extend({},this.defaults,t)},mutationObserver:window.MutationObserver||window.WebKitMutationObserver,eventListenerSupported:window.addEventListener,checkInit:function(){return jQuery('.strong-view[data-state="idle"]').length},initSliders:function(){var t=jQuery('.strong-view.slider-container[data-state="idle"]');debugit&&console.log("sliders found:",t.length),t.length&&t.each((function(){var t=jQuery(this),e=t.data("count");void 0!==e&&1===e||t.strongSlider()}))},initPagers:function(){var t=jQuery('.strong-pager[data-state="idle"]');debugit&&console.log("pagers found:",t.length),t.length&&t.each((function(){jQuery(this).strongPager()}))},initLayouts:function(){this.grids=jQuery('.strong-view[data-state="idle"] .strong-masonry'),debugit&&console.log("Masonry found:",this.grids.length),this.grids.length&&(this.grids.prepend('<div class="grid-sizer"></div><div class="gutter-sizer"></div>'),this.grids.imagesLoaded((function(){strongController.grids.masonry({columnWidth:".grid-sizer",gutter:".gutter-sizer",itemSelector:".wpmtst-testimonial",percentPosition:!0}),strongController.grids.closest(".strong-view").attr("data-state","init")})))},initForm:function(){var t=jQuery('.strong-form[data-state="idle"]'),e=jQuery(".wpmtst-testimonial-success");debugit&&console.log("forms found:",t.length),debugit&&console.log("messages found:",e.length),(t.length||e.length)&&jQuery(t).each((function(){new strongValidation(this)}))},initIframes:function(){this.iframes=jQuery("iframe")},customEvents:function(){addEventListener("toggleFullContent",(function(t){strongController.grids.length&&strongController.grids.masonry()}))},observer:function(t,e){this.mutationObserver?new this.mutationObserver((function(t){for(var n=0;n<t.length;n++)if(t[n].addedNodes.length){debugit&&console.log("mutation observed",t);for(var o=0;o<t[n].addedNodes.length;o++)if(t[n].addedNodes[o].id===strongController.config.containerId)return debugit&&console.log("+",strongController.config.containerId),void e()}})).observe(t,{childList:!0,subtree:!0}):this.eventListenerSupported&&t.addEventListener("DOMNodeInserted",(function(n){n.currentTarget.id===t.id&&(debugit&&console.log("DOMNodeInserted:",n.currentTarget.id),e())}),!1)},intervalId:null,timeoutId:null,newInterval:function(){strongController.intervalId=setInterval((function(){debugit&&console.log("tick > checkInit",strongController.checkInit()),strongController.checkInit()&&strongController.start()}),strongController.config.universalTimer)},newTimeout:function(){strongController.timeoutId=setTimeout((function(){debugit&&console.log("tick > checkInit",strongController.checkInit()),strongController.checkInit()&&strongController.start()}),strongController.config.observerTimer)},init:function(){debugit&&console.log("strongController init");var t={};void 0!==window.strongControllerParms?t=window.strongControllerParms:debugit&&console.log("settings not found"),this.setup(t),debugit&&console.log("config",this.config),"documentReady"===this.config.initializeOn?jQuery(document).ready((function(){debugit&&console.log("document ready"),strongController.start(),strongController.listen()})):jQuery(window).on("load",(function(){debugit&&console.log("window load"),strongController.start(),strongController.listen()})),jQuery(window).on("load",(function(){strongController.listenForIframeReady()})),jQuery("textarea.max-length, input.text.max-length").on("keyup",(function(){var t=jQuery(this).attr("maxlength"),e=jQuery(this).val().length;null!==t&&jQuery(this).parent().find(".max-length-counter").html(e+" characters out of "+t)}))},start:function(){debugit&&console.log("start"),strongController.initSliders(),strongController.initPagers(),strongController.initLayouts(),strongController.initForm(),strongController.initIframes(),strongController.customEvents()},listen:function(){switch(debugit&&console.log("listen"),this.config.method){case"universal":this.newInterval();break;case"observer":this.observer(document.getElementById(this.config.containerId),this.newTimeout);break;case"event":document.addEventListener(this.config.event,this.start);break;case"script":if("barba"===this.config.script)"object"==typeof Barba&&Barba.hasOwnProperty("Dispatcher")&&Barba.Dispatcher.on("transitionCompleted",this.start)}},listenForIframeReady:function(){debugit&&console.log("listenForIframeReady"),strongController.iframes.length&&strongController.grids.length?strongController.iframes.ready((function(){setTimeout((function(){strongController.grids.masonry(),debugit&&console.log("listenForIframeReady","timeout 1")}),1e3),setTimeout((function(){strongController.grids.masonry(),debugit&&console.log("listenForIframeReady","timeout 2")}),2e3)})):debugit&&console.log("listenForIframeReady","no iframes or Masonry found")}};strongController.init();