PageSourceSearch

https://aliit.ru/bitrix/components/aspro/com.banners.allcorp3/templates/.default/script.js?17518529403001

js aliit.ru collected 2026-10-07 18:43:36 UTC 3,001 bytes, 76 lines download raw bytes

1function checkNavColor(slider) {
2  var nav_color_flex = slider.find(".swiper-slide-active").data("nav_color"),
3    menu_color = slider.find(".swiper-slide-active").data("color");
4  if (nav_color_flex == "dark") slider.find(".swiper-pagination").addClass("flex-dark");
5  else slider.find(".swiper-pagination").removeClass("flex-dark");
6  if (typeof checkNavColor.hasLongBanner === "undefined") {
7    checkNavColor.hasLongBanner = $(".header_opacity").length;
8  }
9  if (checkNavColor.hasLongBanner && typeof logo_depend_banners === 'function') logo_depend_banners(menu_color);
10
11  var eventdata = { slider: slider };
12  BX.onCustomEvent("onSlide", [eventdata]);
13}
14
15readyDOM(function () {
16  $(".main-slider").mouseenter(function () {
17    if (!$(this).hasClass("video_visible") && $(this).data("swiper")) {
18      if ($(this).data("swiper").params.autoplay.enabled) {
19        $(this).data("swiper").autoplay.stop();
20      }
21    }
22  });
23
24  $(".main-slider").mouseleave(function () {
25    if (!$(this).hasClass("video_visible") && $(this).data("swiper")) {
26      if ($(this).data("swiper").params.autoplay.enabled) {
27        $(this).data("swiper").autoplay.start();
28      }
29    }
30  });
31});
32
33BX.addCustomEvent("onSetSliderOptions", function (options) {
34  if ("type" in options && options.type === "main_banner") {
35    if (typeof arAsproOptions["THEME"] != "undefined") {
36      const slideshowSpeed = Math.abs(parseInt(arAsproOptions["THEME"]["BIGBANNER_SLIDESSHOWSPEED"]));
37      const animationSpeed = Math.abs(parseInt(arAsproOptions["THEME"]["BIGBANNER_ANIMATIONSPEED"]));
38
39      options.autoplay = slideshowSpeed && arAsproOptions["THEME"]["BIGBANNER_ANIMATIONTYPE"].length ? {} : false;
40      // options.autoplay.pauseOnMouseEnter = true;
41      // options.autoplay.disableOnInteraction = false;
42      options.effect = arAsproOptions["THEME"]["BIGBANNER_ANIMATIONTYPE"] === "FADE" ? "fade" : "slide";
43      if (animationSpeed >= 0) {
44        options.speed = animationSpeed;
45      }
46      if (slideshowSpeed >= 0) {
47        options.autoplay.delay = slideshowSpeed;
48      }
49      /*if (arAsproOptions["THEME"]["BIGBANNER_ANIMATIONTYPE"] !== "FADE") {
50          options.direction =
51            arAsproOptions["THEME"]["BIGBANNER_ANIMATIONTYPE"] === "SLIDE_VERTICAL" ? "vertical" : "horizontal";
52        }*/
53    }
54
55    if ("CURRENT_BANNER_INDEX" in arAsproOptions && arAsproOptions["CURRENT_BANNER_INDEX"]) {
56      currentBannerIndex = arAsproOptions["CURRENT_BANNER_INDEX"] - 1;
57      if (currentBannerIndex < options.countSlides) {
58        options.initialSlide = currentBannerIndex;
59        options.autoplay = false;
60      }
61    }
62  }
63});
64
65BX.addCustomEvent("onSlideChanges", function (eventdata) {
66  if ("slider" in eventdata && eventdata.slider) {
67    const slider = eventdata.slider;
68    if (slider && slider.params) {
69      if ("type" in slider.params && slider.params.type === "main_banner") {
70        setTimeout(function () {
71          checkNavColor($(slider.el));
72        }, 100);
73      }
74    }
75  }
76});

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.