PageSourceSearch

https://www.nayeef.com/dist/front/static/new_default_theme/animations.js?v=640

js nayeef.com collected 2026-09-24 14:49:04 UTC 1,907 bytes, 57 lines download raw bytes

1const SCROLL_ANIMATION_TRIGGER_CLASSNAME = "f-scroll-trigger";
2const SCROLL_ANIMATION_OFFSCREEN_CLASSNAME = "f-scroll-trigger--offscreen";
3const SCROLL_ANIMATION_CANCEL_CLASSNAME = "f-scroll-trigger--cancel";
4
5function updateElementVisibility(element, isVisible) {
6  if (isVisible) {
7    element.classList.remove(SCROLL_ANIMATION_OFFSCREEN_CLASSNAME);
8  } else {
9    element.classList.add(SCROLL_ANIMATION_OFFSCREEN_CLASSNAME);
10    element.classList.remove(SCROLL_ANIMATION_CANCEL_CLASSNAME);
11  }
12}
13
14function handleMobileChange(element) {
15  const removeTriggerClass = () => element.classList.remove(SCROLL_ANIMATION_TRIGGER_CLASSNAME);
16
17  if (FecTheme.config.mqlMobile || element.dataset.type === "fixed") {
18    removeTriggerClass();
19  }
20
21  document.addEventListener("matchMobile", removeTriggerClass);
22  document.addEventListener("unmatchMobile", removeTriggerClass);
23}
24
25function onIntersection(entries, observer) {
26  entries.forEach((entry, index) => {
27    const { isIntersecting, target } = entry;
28    updateElementVisibility(target, isIntersecting);
29
30    if (isIntersecting) {
31      if (target.hasAttribute("data-cascade")) {
32        target.setAttribute("style", `--animation-order: ${index};`);
33      }
34      observer.unobserve(target);
35    }
36
37    if (target.classList.contains("f-sidebar")) {
38      handleMobileChange(target);
39    }
40  });
41}
42
43const observer = new IntersectionObserver(onIntersection, {
44  rootMargin: "0px 0px -50px 0px",
45});
46
47function initializeScrollAnimationTrigger(rootEl = document, isDesignModeEvent = false) {
48  const elements = rootEl.getElementsByClassName(SCROLL_ANIMATION_TRIGGER_CLASSNAME);
49
50  if (elements.length === 0 || isDesignModeEvent) return;
51
52  Array.from(elements).forEach((element) => observer.observe(element));
53}
54
55document.addEventListener("DOMContentLoaded", () => initializeScrollAnimationTrigger());
56
57

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.