PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.14.0
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.14.0
2.14.0 2.13.0 2.13.1 2.12.0 2.11.1 2.11.0 2.10.0 2.9.0 2.7.4 2.7.5 2.7.6 2.7.7 2.8.0 2.8.1 2.9.1 trunk 1.0 1.0-beta1 1.0-beta2 1.0-beta3 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 All 81 releases
← All changes | assets/build/blocks-common.js +2 -0 2.7.5 → 2.14.0 View file →
@@ -1,0 +1,2 @@
1 +(()=>{"use strict";const t=class{constructor(t){if(this.ablocksAnimation=t,!this.ablocksAnimation||!t?.classList.contains("ablocks-invisible"))return;const e=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&(this.applyAnimation(t.target),e.unobserve(t.target))})},{threshold:.5});Array.isArray(t)||t instanceof NodeList?t.forEach(t=>{e.observe(t)}):t&&e.observe(t),window.addEventListener("resize",()=>this.handleResize(t))}applyAnimation(t){if(t.getAttribute("data-settings")){const e=JSON.parse(t.getAttribute("data-settings")),i=window.matchMedia(`(max-width: ${this.getBreakpoint("tablet")}) and (min-width: ${this.getBreakpoint("mobile")})`).matches,a=window.matchMedia(`(max-width: ${this.getBreakpoint("mobile")})`).matches;let n=e.animationType;if(i?n=e.animationTypeTablet||e.animationType:a&&(n=e.animationTypeMobile||e.animationType),t.style.visibility="visible","none"===n)return;t.style.setProperty("--animate-duration",`${e.animationDuration||1}s`),
2 +t.style.setProperty("--animate-delay",`${e.animationDelay||0}s`),t.classList.add("animate__animated","animate__"+n)}}handleResize(t){Array.isArray(t)||t instanceof NodeList?t.forEach(t=>{this.applyAnimation(t)}):t&&this.applyAnimation(t)}getBreakpoint(t){switch(t){case"tablet":return"800px";case"mobile":return"480px";default:return"1200px"}}};document.addEventListener("DOMContentLoaded",()=>{!function(){const e=document.querySelectorAll(".ablocks-invisible");e?.length&&e.forEach(e=>{new t(e)})}()})})();