~(function (e, fn) { "use strict"; if (typeof e === undefined || typeof module === undefined) { return }; e.__proto__.elLoad = fn })(this, (function () { "use strict"; var config = {}; var el_group = undefined; let obs = null; var elParent = undefined; var scrollHandler = function () { }; function listenHandler() { window.addEventListener("scroll", scrollHandler, false) | window.addEventListener("DOMMouseScroll", scrollHandler, false) }; function bs(d) { d.forEach(el => { if (el.isIntersecting) { let cf = el.target; show(cf, 'visibility', 'visible', 200); let id = setTimeout(() => { show(cf, 'opacity', '1', 200); clearTimeout(id) }); obs.unobserve(cf) } }) }; function append() { }; function show(el, animate, value, dur) { el.style[animate] = value; el.style.transition = animate + " ." + (dur || 0) + "s " + 0 + "ms" }; function init() { if (typeof IntersectionObserver === 'function') { obs = new IntersectionObserver(bs); Array.from(el_group).forEach(m => obs.observe(m)) } else { listenHandler() } }; function destory() { window.removeEventListener("scroll", scrollHandler); window.removeEventListener("DOMMouseScroll", scrollHandler); obs.disconnect() }; window.onunload = function () { window.confirm(); destory() }; return function (el, conf) { el_group = document.querySelectorAll(el); config = conf; elParent = el_group[0].parentElement;; init() } })());