PageSourceSearch

https://www.masterwal.jp/js/usr/top.js?221202_v4

js masterwal.jp collected 2026-10-03 21:51:32 UTC 8,365 bytes, 319 lines download raw bytes

1var ecblib = ecblib || {};
2ecblib.customize = ecblib.customize || {};
3ecblib.customize.top = ecblib.customize.top || {};
4
5(function () {
6    'use strict';
7
8    var _top = ecblib.customize.top;
9
10}());
11
12jQuery(function(){
13	jQuery('#top-mv #top-mv-slider').slick({
14		autoplay: true,
15		autoplaySpeed: 5000,
16		dots: false,
17		slidesToShow: 1
18	});
19});
20
21
22jQuery(window).on('load',function(){
23	if(jQuery('#top-topics .top-topics-list').length){
24		jQuery('#top-topics .top-topics-list').slick({
25			autoplay: true,
26			autoplaySpeed: 5000,
27			dots: true,
28			slidesToShow: 3,
29			arrows: false,
30			centerMode: true,
31			variableWidth: true,
32		});
33	}
34
35	if(jQuery('#top-column .top-column-list').length){
36		jQuery('#top-column .top-column-list').slick({
37			autoplay: true,
38			autoplaySpeed: 5000,
39			dots: true,
40			slidesToShow: 3,
41			arrows: false,
42			centerMode: true,
43			variableWidth: true,
44		});
45	}
46});
47
48//youtube
49var tag = document.createElement('script');
50tag.src = "https://www.youtube.com/iframe_api";
51var firstScriptTag = document.getElementsByTagName('script')[0];
52firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
53
54const targetVideo = document.querySelector('#yt-player');
55
56var player;
57var yt = [];
58function onYouTubeIframeAPIReady() {
59    // 描画サイズ
60    let w = '100%';
61    let h = '100%';
62    // 各YouTubeのIDを指定
63    yt['player1'] = new YT.Player('yt-player1', {
64        width: w,
65        height: h,
66        videoId: 'mvKuZonANHI',
67				playerVars:{
68					'controls':0,
69				},
70        events: {
71            'onReady': onPlayerReady,
72        },
73    });
74}
75function onPlayerReady(event) {
76	event.target.mute();
77	event.target.playVideo();
78}
79
80
81window.addEventListener('DOMContentLoaded',()=>{
82function setHeight() {
83  let vh = window.innerHeight * 0.01;
84  document.documentElement.style.setProperty("--vh", `${vh}px`);
85}
86setHeight();
87window.addEventListener("resize", setHeight);
88
89const verticalSlider = new Swiper(".vertical-slider", {
90  direction: "vertical",
91	loop: false,
92  slidesPerView: 1,
93  speed: 500,
94  mousewheel: {
95    forceToAxis: true,
96    sensitivity: 1,
97    releaseOnEdges: true,
98  },
99  pagination: {
100    el: ".vertical-slider__pagination",
101    type: "bullets",
102    clickable: true,
103  },
104	on: {
105		slideChange: function() {
106				setTimeout(function () {
107					verticalSlider.params.mousewheel.releaseOnEdges = false;
108				}, 500);
109		},
110		reachEnd: function() {
111				setTimeout(function () {
112					verticalSlider.params.mousewheel.releaseOnEdges = true;
113				}, 750);
114		}
115}
116
117});
118
119const productSlides = document.querySelectorAll('.slide-product .swiper-slide')
120if(productSlides.length > 1){
121	const horizontalSlider1 = new Swiper(".slide-product", {
122		direction: "horizontal",
123		slidesPerView: 1,
124		autoplay:{
125			disableOnInteraction:false,
126		},
127		loop:true,
128		navigation: {
129				nextEl: '.swiper-button-next',
130				prevEl: '.swiper-button-prev',
131			},
132		speed: 1200,
133		pagination: {
134			el: ".horizontal-slider__pagination",
135			type: "bullets",
136			clickable: true,
137		},
138	});
139	const getPagination = document.querySelector('.slide-product .button-stop');
140	addStopButton(getPagination);
141	const getStopButton = document.querySelector('.slide-product .js-slide-stop');
142	slideStop(getStopButton,horizontalSlider1);
143}
144
145const storeSlides = document.querySelectorAll('.slide-store .swiper-slide')
146if(storeSlides.length > 1){
147	const horizontalSlider1 = new Swiper(".slide-store", {
148		direction: "horizontal",
149		slidesPerView: 1,
150		autoplay:{
151			disableOnInteraction:false,
152		},
153		loop:true,
154		navigation: {
155				nextEl: '.swiper-button-next',
156				prevEl: '.swiper-button-prev',
157			},
158		speed: 1200,
159		pagination: {
160			el: ".horizontal-slider__pagination",
161			type: "bullets",
162			clickable: true,
163		},
164	});
165	const getPagination = document.querySelector('.slide-store .button-stop');
166	addStopButton(getPagination);
167	const getStopButton = document.querySelector('.slide-store .js-slide-stop');
168	slideStop(getStopButton,horizontalSlider1);
169}
170
171const brandingSlides = document.querySelectorAll('.slide-branding .swiper-slide')
172if(brandingSlides.length > 1){
173	const horizontalSlider1 = new Swiper(".slide-branding", {
174		direction: "horizontal",
175		slidesPerView: 1,
176		autoplay:{
177			disableOnInteraction:false,
178		},
179		loop:true,
180		navigation: {
181				nextEl: '.swiper-button-next',
182				prevEl: '.swiper-button-prev',
183			},
184		speed: 1200,
185		pagination: {
186			el: ".horizontal-slider__pagination",
187			type: "bullets",
188			clickable: true,
189		},
190	});
191	const getPagination = document.querySelector('.slide-branding .button-stop');
192	addStopButton(getPagination);
193	const getStopButton = document.querySelector('.slide-branding .js-slide-stop');
194	slideStop(getStopButton,horizontalSlider1);
195}
196
197const serviceSlides = document.querySelectorAll('.slide-service .swiper-slide')
198if(serviceSlides.length > 1){
199	const horizontalSlider3 = new Swiper(".slide-service", {
200		direction: "horizontal",
201		slidesPerView: 1,
202		autoplay:{
203			disableOnInteraction:false,
204		},
205		loop:true,
206		navigation: {
207				nextEl: '.swiper-button-next',
208				prevEl: '.swiper-button-prev',
209			},
210		speed: 1200,
211		pagination: {
212			el: ".horizontal-slider__pagination",
213			type: "bullets",
214			clickable: true,
215		},
216		// on : {
217		// 	transitionStart: function(){
218		// 		yt['player1'].pauseVideo();
219		// 	}
220		// }
221	});
222	const getPagination = document.querySelector('.slide-service .button-stop');
223	addStopButton(getPagination);
224	const getStopButton = document.querySelector('.slide-service .js-slide-stop');
225	slideStop(getStopButton,horizontalSlider3);
226}
227
228const otherSlides = document.querySelectorAll('.slide-other .swiper-slide')
229if(otherSlides.length > 1){
230	const horizontalSlider = new Swiper(".slide-other", {
231		direction: "horizontal",
232		slidesPerView: 1,
233		autoplay:{
234			disableOnInteraction:false,
235		},
236		loop:true,
237		navigation: {
238				nextEl: '.swiper-button-next',
239				prevEl: '.swiper-button-prev',
240			},
241		speed: 1200,
242		pagination: {
243			el: ".horizontal-slider__pagination",
244			type: "bullets",
245			clickable: true,
246		},
247	});
248	const getPagination = document.querySelector('.slide-other .button-stop');
249	addStopButton(getPagination);
250	const getStopButton = document.querySelector('.slide-other .js-slide-stop');
251	slideStop(getStopButton,horizontalSlider);
252}
253
254const topicsSlides = document.querySelectorAll('.slide-topics .swiper-slide')
255if(topicsSlides.length > 1){
256	const horizontalSlider = new Swiper(".slide-topics", {
257		direction: "horizontal",
258		slidesPerView: 1,
259		autoplay:{
260			disableOnInteraction:false,
261		},
262		loop:true,
263		navigation: {
264				nextEl: '.swiper-button-next',
265				prevEl: '.swiper-button-prev',
266			},
267		speed: 1200,
268		pagination: {
269			el: ".horizontal-slider__pagination",
270			type: "bullets",
271			clickable: true,
272		},
273	});
274	const getPagination = document.querySelector('.slide-topics .button-stop');
275	addStopButton(getPagination);
276	const getStopButton = document.querySelector('.slide-topics .js-sli
276de-stop');
277	slideStop(getStopButton,horizontalSlider);
278}
279
280
281function addStopButton(target){
282	const stopButton = document.createElement('button');
283	stopButton.classList.add('js-slide-stop');
284	stopButton.classList.add('slide-stop');
285	const stopButtonImg = document.createElement('img');
286	stopButtonImg.src = '/img/usr/top/icon_stop.png';
287	stopButton.appendChild(stopButtonImg);
288	target.appendChild(stopButton);
289}
290;
291
292function slideStop(stopButton,swiperSlide){
293	stopButton.addEventListener('click',(e)=>{
294		if(e.currentTarget.classList.contains('is-active') == false){
295			e.currentTarget.classList.add('is-active');
296			e.target.src = '/img/usr/top/icon_play.png';
297			swiperSlide.autoplay.stop();
298		}else{
299			e.currentTarget.classList.remove('is-active');
300			e.target.src = '/img/usr/top/icon_stop.png';
301			swiperSlide.autoplay.start();
302		}
303	})
304}
305})
306
307
308jQuery(window).on('load',function(){
309var mvHeight = jQuery("#fullpage").outerHeight();
310jQuery(window).scroll(function () {
311	if (jQuery(window).scrollTop() > mvHeight) {
312		  jQuery("#right-side-fixed-link").css("display", "block");
313	} else {
314		jQuery("#right-side-fixed-link").css("display", "none");
315	}
316});
317});
318
319

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.