PageSourceSearch

https://alidropship.com//wp-content/themes/alidrop/js/pages/digital-products.js?ver=1789969403

js alidropship.com collected 2026-09-24 08:28:36 UTC 5,250 bytes, 67 lines download raw bytes

1/* scroll reveal */
2(function(){
3  var els=[].slice.call(document.querySelectorAll('.appear'));
4  if(!('IntersectionObserver'in window)){els.forEach(function(e){e.classList.add('is-visible')});return}
5  function cb(en,obs){en.forEach(function(x){if(x.isIntersecting){x.target.classList.add('is-visible');obs.unobserve(x.target)}})}
6  /* The -8% bottom margin holds a reveal back until the element is properly on
7     screen. It also carves off a strip the page can never scroll past, so
8     anything sitting inside it at full scroll - the fine print under the last
9     CTA - would stay at opacity:0 for good. Those are watched without the strip
10     instead, so they still fade in on the same transition as everything else.
11     Re-checked on resize, because the strip is 8% of the viewport height. */
12  var io=new IntersectionObserver(cb,{threshold:.14,rootMargin:'0px 0px -8% 0px'}),
13      ioEnd=new IntersectionObserver(cb,{threshold:.14});
14  function watch(){
15    var docH=document.documentElement.scrollHeight,strip=window.innerHeight*0.08;
16    els.forEach(function(e){
17      if(e.classList.contains('is-visible'))return;
18      io.unobserve(e);ioEnd.unobserve(e);
19      (docH-(e.getBoundingClientRect().bottom+window.scrollY)<strip?ioEnd:io).observe(e);
20    });
21  }
22  watch();
23  window.addEventListener('resize',watch);
24})();
25/* hero collage - ported from sellvia.com/free-online-store-plus-instagram-and-tiktok-store:
26   each card fades in (CSS opacity) and slides down from above (JS rAF) with a staggered arrival,
27   then drifts on scroll (per-card parallax factor). Motion is skipped under reduced-motion / off-screen. */
28(function(){var hero=document.querySelector('.hero');var cards=[].slice.call(document.querySelectorAll('.hp-card'));if(!hero||!cards.length)return;if(window.matchMedia&&window.matchMedia('(prefers-reduced-motion: reduce)').matches){cards.forEach(function(c){c.classList.add('in')});return}var factors=[0.36,0.60,0.20,0.44,0.52];var SLIDE=[[-95,1100],[-150,1050],[-60,1150],[-110,1250],[-130,1150]];function slideIn(card,startY,dur){var t0=null;function step(now){if(t0===null)t0=now;var t=Math.min(1,(now-t0)/dur);var e=1-Math.pow(1-t,3);card.style.transform='translateY('+(startY*(1-e)).toFixed(1)+'px)';if(t<1)requestAnimationFrame(step);else card.dataset.slideDone='1'}requestAnimationFrame(step)}function reveal(){cards.forEach(function(card,i){card.classList.add('in');if(SLIDE[i])slideIn(card,SLIDE[i][0],SLIDE[i][1])})}setTimeout(reveal,350);var visible=true;if('IntersectionObserver'in window){new IntersectionObserver(function(en){visible=en[0].isIntersecting},{threshold:0}).observe(hero)}var pending=false;function update(){pending=false;if(!visible)return;var sy=window.scrollY;cards.forEach(function(card,k){if(SLIDE[k]&&card.dataset.slideDone!=='1')return;var f=factors[k]!=null?factors[k]:0.4;card.style.transform='translateY('+(sy*f).toFixed(1)+'px)'})}window.addEventListener('scroll',function(){if(!pending){pending=true;requestAnimationFrame(update)}},{passive:true})})();
29/* incl-split: one live bullet at a time.
30   3s auto-rotation with the image slider, and manual control that always wins:
31   - hovering a bullet switches to it at once and freezes the rotation
32   - leaving the list resumes the rotation from the current bullet
33   - clicking or tapping a bullet switches to it at once, then lets it run on
34   The bullet and its image are switched in the same call, so they never drift.
35   Unlike the original, the handlers are attached unconditionally - the old
36   `(hover: hover)` gate skipped them entirely on touch-capable machines, and
37   there was no click handler at all. */
38(function(){
39  var wrap=document.querySelector('.incl-bullets');if(!wrap)return;
40  var items=[].slice.call(wrap.querySelectorAll('li'));
41  var imgs=[].slice.call(document.querySelectorAll('.incl-right img'));
42  if(!items.length)return;
43  function mq(q){return!!(window.matchMedia&&window.matchMedia(q).matches)}
44  var STEP=3000,i=0,timer=null,held=false,live=false,reduce=mq('(prefers-reduced-motion: reduce)');
45  function set(n){
46    if(n===i&&items[n].classList.contains('is-active'))return;   /* skip redundant re-toggles so the fade is not restarted */
47    i=n;
48    items.forEach(function(el,k){el.classList.toggle('is-active',k===n)});
49    imgs.forEach(function(el,k){el.classList.toggle('is-active',k===n)});
50  }
51  function stop(){if(timer){clearTimeout(timer);timer=null}}
52  function arm(){stop();if(reduce||held||!live)return;timer=setTimeout(function(){set((i+1)%items.length);arm()},STEP)}
53  function hit(t){var li=t&&t.closest?t.closest('li'):null;return li?items.indexOf(li):-1}
54  set(0);
55  wrap.addEventListener('mouseover',function(e){
56    var n=hit(e.target);if(n<0)return;
57    held=true;stop();set(n);
58  });
59  wrap.addEventListener('mouseleave',function(){held=false;arm()});
60  wrap.addEventListener('click',function(e){
61    var n=hit(e.target);if(n<0)return;
62    set(n);held=false;arm();   /* a tap emits mouseover first, which would otherwise hold forever on touch */
63  });
64  if('IntersectionObserver'in window){
65    new IntersectionObserver(function(en){en.forEach(function(x){live=x.isIntersecting;if(live){arm()}else{stop()}})},{threshold:.25}).observe(wrap);
66  }else{live=true;arm()}
67})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.