PageSourceSearch

https://www.toli.co.jp/js/index.js?20250402

js toli.co.jp collected 2026-09-24 20:47:27 UTC 2,789 bytes, 104 lines download raw bytes

1/**
2 * Swiper スライダー設定
3 */
4window.onload = function () {
5  // .swiper-containerMain 用のSwiperインスタンス
6  var swiperMain = new Swiper('.swiper-containerMain', {
7    loop: true,
8    spaceBetween: 80,
9    effect: 'fade',
10    speed: 1500,
11    slidesPerView: 'auto',
12    centeredSlides: true,
13    autoplay: {
14      delay: 3000,
15      disableOnInteraction: false,
16    },
17    pagination: {
18      el: '.swiper-pagination',
19      type: 'bullets',
20      clickable: true,
21    },
22    breakpoints: {
23      767: {
24        slidesPerView: 1,
25        spaceBetween: 0
26      }
27    }
28  });
29
30  // .swiper-containerBanners 用のSwiperインスタンス
31  var swiperBanners = new Swiper('.swiper-containerBanners', {
32    slidesPerView: 4,
33    spaceBetween: 14,
34    loop: true,
35    autoplay: {
36      delay: 3000,
37      disableOnInteraction: false,
38    },
39    pagination: {
40      el: '.swiper-pagination',
41      type: 'bullets',
42      clickable: true,
43    },
44    navigation: {
45      nextEl: '.swiper-button-next',
46      prevEl: '.swiper-button-prev',
47    },
48    breakpoints: {
49      767: {
50        slidesPerView: 2,
51        spaceBetween: 15
52      }
53    }
54  });
55
56  // .swiper-containerMain 用の一時停止・再開ボタンの処理
57  document.querySelector(".stopbtn-main").addEventListener("click", function() {
58    if (this.classList.contains("stop")) {
59      swiperMain.autoplay.stop(); // 一時停止
60      this.classList.remove("stop");
61      this.classList.add("start");
62    } else {
63      swiperMain.autoplay.start(); // 再生
64      this.classList.remove("start");
65      this.classList.add("stop");
66    }
67  });
68
69  // .swiper-containerBanners 用の一時停止・再開ボタンの処理
70  document.querySelector(".stopbtn-banners").addEventListener("click", function() {
71    if (this.classList.contains("stop")) {
72      swiperBanners.autoplay.stop(); // 一時停止
73      this.classList.remove("stop");
74      this.classList.add("start");
75    } else {
76      swiperBanners.autoplay.start(); // 再生
77      this.classList.remove("start");
78      this.classList.add("stop");
79    }
80  });
81};
82
83// 画像右クリック不可
84$(document).ready(function () {
85  $('.no-right-click').on('contextmenu', function (e) {
86    e.preventDefault();
87  });
88});
89
90// yappli スマートバナー設置_Android版
91if (/Android/i.test(navigator.userAgent)) {
92  // 画像の読み込み完了後に高さを取得
93  const img = document.getElementById('banner-img');
94  img.onload = function() {
95      const imgHeight = img.clientHeight;
96      // 取得した画像の高さをl-headerのtopに設定
97      document.querySelector('.l-header').style.top = (imgHeight - 2) + 'px';
98  };
99
100  // 画像がキャッシュから読み込まれる場合の対策
101  if (img.complete) {
102      img.onload();
103  }
104}

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.