PageSourceSearch

https://visitmatsumoto.com/js/index.js?26091501

js visitmatsumoto.com collected 2026-10-02 04:21:54 UTC 6,422 bytes, 225 lines download raw bytes

1// JavaScript Document
2
3// #hero
4//$('#heroSlide dl').eq(0).find('img').attr('fetchpriority', 'high');
5$('#heroSlide dl').wrap('<span>');
6$('#heroSlide').slick({
7	autoplay: true,
8	arrows: false,
9	dots: true,
10	fade: true,
11});
12
13
14// #heroCrowd
15/*
16$('#heroCrowdTab button').each(function(index) {
17	const num = String(index + 1).padStart(2, '0');
18	$(this).attr('popovertarget', 'crowdList_' + num);
19});
20$('#heroCrowdTab button[data-link-type="none"]').each(function(index) {
21	$(this).parents("dl").on("click",function(e){
22		return false;
23	});
24});
25$('#heroCrowdTab button[data-link-type="direct"]').each(function(index) {
26	var $button = $(this);
27	$(this).parents("dl").css("cursor","pointer");
28	$(this).parents("dl").on("click",function(e){
29		window.location.href = $button.data("link-url");
30	});
31});
32*/
33$('#heroCrowdTab button').each(function(index) {
34	$(this).attr('popovertarget', 'crowdList_' + $(this).data('id'));
35});
36$('#heroCrowdList section').each(function(index) {
37	$(this).attr('id', 'crowdList_' + $(this).data('id'));
38	$(this).find('button[popovertargetaction]').attr('popovertarget', 'crowdList_' + $(this).data('id'));
39});
40$('#heroCrowdList section').each(function () {
41	const popover = this;
42	let redirectTimer;
43	let countdownTimer;
44	popover.addEventListener('toggle', function (e) {
45		if (e.newState === 'open') {
46			const span = popover.querySelector('h4 span');
47			const link = popover.querySelector('h4 + div a');
48			let seconds = 5;
49			span.textContent = seconds;
50			countdownTimer = setInterval(() => {
51				seconds--;
52				span.textContent = seconds;
53				if (seconds <= 0) {
54					clearInterval(countdownTimer);
55				}
56			}, 1000);
57			redirectTimer = setTimeout(() => {
58				//window.open(link.href, link.target);
59				link.click();
60			}, 5000);
61		} else {
62			clearTimeout(redirectTimer);
63			clearInterval(countdownTimer);
64		}
65	});
66});
67
68
69// #topics
70$(function(){
71	var h = 0;
72	$('#topics h3').each(function(){
73		if($(this).height() > h){
74			h = $(this).height();
75		}
76	});
77	$('#topics h3').css('height', h + 'px');
78});
79$('#topics section').wrapAll('<div id="topicsSlideMain">');
80$('#topics section').wrap('<span>');
81$('#topicsSlideMain').clone().appendTo('#topicsList').attr('id', 'topicsSlideSub');
82$('#topicsList').append('<div class="slick-con"></div>')
83$('#topicsSlideMain').slick({
84	asNavFor: '#topicsSlideSub',
85	arrows: false,
86	dots: false,
87	responsive: [{
88		breakpoint: 1200,
89		settings: {
90			variableWidth: true,
91			centerMode: true,
92			centerPadding: 0,
93		}
94	}]
95});
96$('#topicsSlideSub').slick({
97	asNavFor: '#topicsSlideMain',
98	variableWidth: true,
99	dots: true,
100	appendArrows: $('.slick-con'),
101	appendDots: $('.slick-con'),
102});
103
104
105// #information
106$('#informationTab li').click(function(){
107	var num = $('#informationTab li').index(this);
108	$('#informationTab li').removeClass('select');
109	$(this).addClass('select');
110	$('#informationList details').eq(num).find('summary').get(0).click();
111});
112
113
114// #seasonal
115$('#seasonalList details').each(function(){
116	$(this).find('section:nth-child(n+2)').wrapAll('<span>');
117});
118$('#seasonalTab li').on("click",function(){
119	var num = $('#seasonalTab li').index(this);
120	$('#seasonalTab li').removeClass('select');
121	$(this).addClass('select');
122	$('#seasonalList details').eq(num).find('summary').get(0).click();
123});
124
125var date   = new Date();
126var month = date.getMonth() + 1;
127var curTab = 1;
128if(month == 3 || month == 4 || month == 5) {
129	curTab = 1;
130} else if(month == 6 || month == 7 || month == 8) {
131	curTab = 2;
132}
132 else if(month == 9 || month == 10 || month == 11) {
133	curTab = 3;
134} else if(month == 12 || month == 1 || month == 2) {
135	curTab = 4;
136}
137setTimeout(function(){
138	$('#seasonalTab li').eq(curTab - 1).get(0).click();
139},500)
140
141// #area
142$('#area section').wrap('<span>');
143$('#areaList').slick({
144	arrows: false,
145	dots: false,
146	infinite: false,
147	responsive: [{
148		breakpoint: 1200,
149		settings: {
150			variableWidth: true,
151			centerMode: true,
152			centerPadding: 0,
153			arrows: true,
154			dots: true,
155			infinite: true,
156		}
157	}]
158});
159
160
161// #ranking
162$('#rankingTab li').click(function(){
163	var num = $('#rankingTab li').index(this);
164	$('#rankingTab li').removeClass('select');
165	$(this).addClass('select');
166	$('#rankingList details').eq(num).find('summary').get(0).click();
167});
168
169
170// #theme
171$('#theme details:eq(0) input').on('change', function(){
172	if ($(this).prop('checked')){
173		$('#theme details:eq(1):not([open]) summary').get(0).click();
174	}
175});
176$('#theme details:eq(1) input').on('change', function(){
177	if ($(this).prop('checked')){
178		$('#theme details:eq(2):not([open]) summary').get(0).click();
179	}
180});
181$('#theme details:eq(2) input').on('change', function(){
182	if ($(this).prop('checked')){
183		$('#theme details:eq(3):not([open]) summary').get(0).click();
184	}
185});
186$('#theme .slide label').wrap('<span>');
187$('#theme .slide').slick({
188	slidesToShow: 3,
189});
190
191
192// #themeSearch
193$('#doThemeSearch').css("pointer-events","none");
194$('#doThemeSearch').on("click",function(){
195	var conditions = [];
196	$('#themeSearch input:checked').each(function(){
197		conditions.push($(this).attr("name")+'='+$(this).val());
198		window.location.href = '/theme/index.html?'+ conditions.join("&");
199	});
200});
201
202$('#themeSearch input').on("change",function(){
203	if($('#themeSearch input[name="who"]:checked').length && $('#themeSearch input[name="purpose"]:checked').length && $('#themeSearch input[name="car"]:checked').length && $('#themeSearch input[name="days"]:checked').length) {
204		$('#doThemeSearch').css("pointer-events","auto").addClass("on");
205	} else {
206		$('#doThemeSearch').css("pointer-events","none").removeClass("on");
207	}
208});
209
210
211// Adobe Fonts
212(function(d) {
213    var config = {
214      kitId: 'hob3ece',
215      scriptTimeout: 3000,
216      async: true
217    },
218    h=d.documentElement,t=setTimeout(function(){h.className=h.className.replace(/\bwf-loading\b/g,"")+" wf-inactive";},config.scriptTimeout),tk=d.createElement("script"),f=false,s=d.getElementsByTagName("script")[0],a;h.className+=" wf-loading";tk.src='https://use.typekit.net/'+config.kitId+'.js';tk.async=true;tk.onload=tk.onreadystatechange=function(){a=this.readyState;if(f||a&&a!="complete"&&a!="loaded")return;f=true;clearTimeout(t);try{Typekit.load(config)}catch(e){}};s.parentNode.insertBefore(tk,s)
219  })(document);
220
221
222
223
224
225

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.