PageSourceSearch

https://www.fujisan-climb.jp/wp-content/themes/mtfuji-climbing-official-web/assets/js/top-banners.js?ver=1.0

js fujisan-climb.jp collected 2026-10-02 03:18:41 UTC 2,219 bytes, 89 lines download raw bytes

1document.addEventListener("DOMContentLoaded", function () {
2  if (typeof Swiper === "undefined") {
3    return;
4  }
5
6  var lang = document.documentElement.getAttribute("lang") || "ja";
7  lang = lang.toLowerCase();
8
9  var isJapanese = lang.indexOf("ja") === 0;
10
11  var jaEl = document.querySelector(".js-top-banners-ja");
12  var foreignEl = document.querySelector(".js-top-banners-foreign");
13  var prevBtn = document.querySelector(".p-top-banners__nav--prev");
14  var nextBtn = document.querySelector(".p-top-banners__nav--next");
15
16  var activeEl = null;
17  var inactiveEl = null;
18
19  if (isJapanese) {
20    activeEl = jaEl ? jaEl : foreignEl;
21    inactiveEl = foreignEl;
22  } else {
23    activeEl = foreignEl ? foreignEl : jaEl;
24    inactiveEl = jaEl;
25  }
26
27  if (!activeEl) {
28    return;
29  }
30
31  if (inactiveEl) {
32    inactiveEl.classList.add("is-hidden");
33    inactiveEl.style.display = "none";
34  }
35
36  activeEl.classList.remove("is-hidden");
37  activeEl.style.display = "block";
38
39  setTimeout(function () {
40    var slides = activeEl.querySelectorAll(".swiper-slide");
41    var slidesCount = slides.length;
42    var isPc = window.innerWidth >= 768;
43    var enableLoop = slidesCount >= 4;
44
45    if (isPc && slidesCount <= 3) {
46      if (prevBtn) prevBtn.style.display = "none";
47      if (nextBtn) nextBtn.style.display = "none";
48    } else {
49      if (prevBtn) prevBtn.style.display = "";
50      if (nextBtn) nextBtn.style.display = "";
51    }
52
53    var paginationEl = activeEl.querySelector(".p-top-banners__pagination");
54
55    var swiper = new Swiper(activeEl, {
56      slidesPerView: 1.15,
57      spaceBetween: 16,
58      loop: enableLoop,
59      speed: 500,
60      grabCursor: true,
61      watchOverflow: true,
62      allowTouchMove: true,
63      observer: true,
64      observeParents: true,
65      updateOnWindowResize: true,
66
67      pagination: {
68        el: paginationEl,
69        clickable: true
70      },
71
72      navigation: {
73        prevEl: ".p-top-banners__nav--prev",
74        nextEl: ".p-top-banners__nav--next"
75      },
76
77      breakpoints: {
78        768: {
79          slidesPerView: 3,
80          spaceBetween: 28
81        }
82      }
83    });
84
85    if (swiper && typeof swiper.update === "function") {
86      swiper.update();
87    }
88  }, 30);
89});

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.