PageSourceSearch

https://www.ministop.co.jp/site_common/js/top.js

js ministop.co.jp collected 2026-10-01 11:59:00 UTC 7,051 bytes, 218 lines download raw bytes

1
2$(function(){
3  
4  //js-slide(TOPページスライドバナー)
5  //日時指定の記載方法(右記をstartやend内に書く):"2025/00/00 00:00"
6  const slideData = [
7    {
8      href: "/syohin/sweets/parfait/doublemitsuimo2026/",
9      img: "/figure/commonBanner/common_slide290.webp",
10      alt: "ダブル蜜いも",
11      start: "2026/10/02 00:00",
12      end: ""
13    },
14    {
15      href: "/campaign/260929zouryoufair/",
16      img: "/figure/commonBanner/common_slide291.webp",
17      alt: "増量フェア",
18      start: "2026/09/29 00:00",
19      end: "2026/10/12 23:59"
20    },
21    {
22      href: "https://online.ministop.co.jp/Page/christmascake.aspx?utm_source=referral&utm_medium=ms_official&utm_campaign=christmas26",
23      target: "_blank",
24      img: "/figure/commonBanner/common_slide288.webp",
25      alt: "クリスマスケーキ",
26      start: "2026/09/25 10:00",
27      end: "2026/12/14 17:59"
28    },
29    {
30      href: "/syohin/nagoyameshi-fair/",
31      img: "/figure/commonBanner/common_slide286.webp",
32      alt: "名古屋めしフェア",
33      start: "2026/09/15 00:00",
34      end: "2026/09/28 23:59"
35    },
36    {
37      href: "/syohin/sweets/parfait/puddingparfait2026-2/",
38      img: "/figure/commonBanner/common_slide287.webp",
39      alt: "なめらかプリンパフェ",
40      start: "2026/09/25 00:00",
41      end: ""
42    },
43    {
44      href: "/syohin/sweets/softcream/gohoubisoft-montblanc/",
45      img: "/figure/commonBanner/common_slide283.webp",
46      alt: "ごほうびソフト-至福のモンブラン-",
47      start: "2026/09/04 00:00",
48      end: "2026/10/01 23:59"
49    },
50    {
51      href: "/syohin/sweets/parfait/pear-parfait2026/",
52      img: "/figure/commonBanner/common_slide279.webp",
53      alt: "香る洋梨パフェ",
54      start: "2026/08/21 00:00",
55      end: ""
56    },
57    {
58      href: "/syohin/sweets/parfait/hakutou-parfait2026/",
59      img: "/figure/commonBanner/common_slide272.webp",
60      alt: "完熟白桃パフェ",
61      start: "2026/07/31 00:00",
62      end: ""
63    },
64    {
65      href: "/syohin/sweets/halohalo/pachipachi-shinemuscat2026/",
66      img: "/figure/commonBanner/common_slide268.webp",
67      alt: "ハロハロ パチパチシャインマスカット",
68      start: "2026/07/10 00:00",
69      end: "2026/09/24 23:59"
70    },
71    {
72      href: "/syohin/tea/milkcoffee-float/",
73      img: "/figure/commonBanner/common_slide265.webp",
74      alt: "ミルクコーヒーフロート",
75      start: "2026/07/03 00:00",
76      end: ""
77    },
78    {
79      href: "/syohin/tea/ichigomilk-float/",
80      img: "/figure/commonBanner/common_slide264.webp",
81      alt: "いちごミルクフロート",
82      start: "2026/07/03 00:00",
83      end: ""
84    },
85    /*{
86      href: "/syohin/sweets/softcream/quality.html",
87      img: "/figure/commonBanner/common_slide138.webp",
88      alt: "北海道ミルクソフト",
89      start: "",
90      end: ""
91    },*/
92    /*{
93      href: "/syohin/98yenonigiri/",
94      img: "/figure/commonBanner/common_slide136.webp",
95      alt: "いつも本体価格98円シリーズ発売中!",
96      start: "",
97      end: "2025/12/01 23:59"
98    },*/
99    {
100      href: "/campaign/1get.html",
101      img: "/figure/commonBanner/common_slide191.webp",
102      alt: "ミニストップで1つ買うと1つもらえる!1GETキャンペーン",
103      start: "2026/01/06 00:00",
104      end: ""
105    },
106    /*{
107      href: "/service/mobileorder/",
108      img: "/figure/commonBanner/common_slide19.webp",
109      alt: "ミニストップのモバイルオーダー",
110      start: "",
111      end: ""
112    },*/
113    {
114      href: "/delivery/",
115      img: "/figure/commonBanner/common_slide18.webp",
116      alt: "デリバリーでおうちミニストップ",
117      start: "",
118      end: ""
119    },
120  ];
121
122  //日時指定
123  const today = new Date();
124
125    slideData.forEach(data => {
126      const start = data.start ? new Date(data.start) : null;
127      const end = data.end ? new Date(data.end) : null;
128
129      const isBeforeStart = start && today < start;//開始日より前なので、表示しない
130      const isAfterEnd = end && today > end;//終了日を過ぎているので、表示しない
131
132      if (!isBeforeStart && !isAfterEnd) {
133        $('#js-slide').append(`
134          <div class="slick-slide">
135            <a href="${data.href}" ${data.href.startsWith("http") ? 'target="_blank"' : ''}>
136              <img src="${data.img}" alt="${data.alt}">
137            </a>
138          </div>
139        `);
140      }
141    });
142
143
144  //スライドバナーにid付与
145  const slideId = "top-main-"
146  const tmp = document.getElementsByClassName("slick-slide") ;
147
148  for (var i = 0; i < tmp.length; i++) {
149      const slideNumber = String(i + 1).padStart(2, '0');
150      tmp[i].setAttribute("id", slideId + slideNumber);
151  }
152
153
154  //slickスライダー
155  var $status_total = $('#js-slide__status__total');
156
157  $('#js-slide').on('init', function(event, slick) {
158    $status_total.text(slick.slideCount);
159  }).slick({
160    autoplay: true,
161    arrows: true,
162    autoplaySpeed:4000,
163    centerMode: true,
164    variableWidth: true,
165    dots: true,
166  }).on('afterChange', function(event, slick, currentIndex) {
167    $('#topMainSlideThum li').removeClass('now');
168    $('#topMainSlideThum li').eq(currentIndex).addClass('now');
169  });
170  $('#topMainSlideThum li').eq(0).addClass('now');
171
172
173//スライダー矢印表示
174  setArrow();
175  $(window).on('load resize', function(){
176  setArrow();
177  });
178  function setArrow(){
179    var winW = $(window).width();
180    if( winW > 1201){
181    var setW = (winW - 1200) / 2 + 1150 ;
182    }else{
183    var setW = "96%";
184    }
185    $("#topMainSlide .slick-arrow.slick-prev").css("right",setW);
186    $("#topMainSlide .slick-arrow.slick-next").css("left",setW);
187  }
188
189
190  //タブコンテンツ
191  if($.cookie("topTab")){
192    $(".topTabList .tabList > li").eq($.cookie("topTab")).addClass("on");
193    $(".topSelectContents .topSelect").eq($.cookie("topTab")).addClass("on");
194  }else{
195    $(".topTabList .tabList > li").eq(0).addClass("on");
196    $(".topSelectContents .topSelect").eq(0).addClass("on");
197  }
198  $(".topTabList .tabList > li").click(function() {
199  var tabNum = $(this).index(".topTabList .tabList > li");
200  $.cookie("topTab" , tabNum , { expires: 30,  path: "/" });
201  $(".topTabList .tabList > li").removeClass("on");
202  $(".topTabList .tabList > li").eq(tabNum).addClass("on");
203  $(".topSelectContents .topSelect").removeClass("on");
204  $(".topSelectContents .topSelect").eq(tabNum).addClass("on");
205  $(".topSelectContents .topToggleTi").removeClass("on");
206  $(".topSelectContents .topToggleTi").eq(tabNum).addClass("on");
207    MINISTOPJS.module.equalHeight(true, true);
208  });
209
210
211  $(".topSelectContents .topToggleTi").click(function() {
212  $(this).toggleClass("on");
213  $(this).next(".topSelect").slideToggle(500);
214    MINISTOPJS.module.equalHeight(true, true);
215  });
216
217
218});

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.