PluginProbe
Blockenberg — 600+ Advanced Gutenberg Blocks & AI Agent for WordPress Block Editor / 2.0.14
Blockenberg — 600+ Advanced Gutenberg Blocks & AI Agent for WordPress Block Editor v2.0.14
2.0.14 2.0.13 2.0.12 2.0.11 2.0.10 2.0.9 trunk 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8
blockenberg / assets / js / motion.js

motion.js in Blockenberg — 600+ Advanced Gutenberg Blocks & AI Agent for WordPress Block Editor 2.0.14, at assets/js/motion.js

10 lines 795 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (function(){
2 'use strict';
3 function boot(){
4 if(window.matchMedia('(prefers-reduced-motion: reduce)').matches||!('IntersectionObserver' in window))return;
5 var observer=new IntersectionObserver(function(entries){entries.forEach(function(e){if(e.isIntersecting){e.target.classList.remove('bkbg-motion-pending');if(e.target.dataset.bkbgOnce!=='0')observer.unobserve(e.target);}else if(e.target.dataset.bkbgOnce==='0')e.target.classList.add('bkbg-motion-pending');});},{threshold:0.08});
6 document.querySelectorAll('[data-bkbg-entrance]').forEach(function(e){e.classList.add('bkbg-motion-ready','bkbg-motion-pending');observer.observe(e);});
7 }
8 if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',boot,{once:true});else boot();
9 })();
10