PageSourceSearch

https://www.frandroid.com/wp-content/themes/humanoid-redesign/dist…/chunks/Slider-vBha5UVAAgxOjme12NNyJ.js

js frandroid.com collected 2026-09-24 08:28:13 UTC 2,093 bytes, 55 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="019ffa44-95cc-75b1-a8aa-41737f0be78d")}catch(e){}}();const Slider = (parent) => {
2  const $parent = $(parent);
3  const $container = $parent.find("#slider-scroll-container");
4  if (!$container.length) {
5    return;
6  }
7  const { offsetWidth, scrollWidth } = $container.get(0);
8  const columnGap = 12;
9  if ($container.length) {
10    const $left = $parent.find("#slider-scroll-container-left");
11    const $right = $parent.find("#slider-scroll-container-right");
12    let firstSize = 0;
13    let lastSize = 0;
14    const $columns = $container.find(".columns");
15    if ($columns.length) {
16      firstSize = $columns.children().first().outerWidth();
17      lastSize = $columns.children().last().outerWidth();
18      if (scrollWidth === offsetWidth + columnGap) {
19        $columns.addClass("is-centered");
20      }
21    }
22    const slideOne = (right = false) => {
23      const modifier = right ? 1 : -1;
24      let scrollLeft = $container.scrollLeft() + (offsetWidth + columnGap) * modifier;
25      if (scrollLeft < firstSize) {
26        scrollLeft = 0;
27      } else if (offsetWidth - lastSize - columnGap > scrollLeft) {
28        scrollLeft = $container.outerWidth();
29      }
30      $container.animate({ scrollLeft }, 300, "swing");
31    };
32    $left.on("click", () => slideOne());
33    $right.on("click", () => slideOne(true));
34    const setActive = () => {
35      const scrollLeft = $container.scrollLeft();
36      if (scrollLeft === 0) {
37        $left.removeClass("is-active");
38      } else {
39        $left.addClass("is-active");
40      }
41      if (scrollLeft + offsetWidth + columnGap >= scrollWidth) {
42        $right.removeClass("is-active");
43      } else {
44        $right.addClass("is-active");
45      }
46    };
47    $container.on("scroll", setActive);
48    setActive();
49  }
50};
51export {
52  Slider as default
53};
54
55//# chunkId=019ffa44-95cc-75b1-a8aa-41737f0be78d

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.