PageSourceSearch

https://caname.co.jp/assets/view/assets/js/common.js?ver=20261004070722

js caname.co.jp collected 2026-10-04 07:07:37 UTC 3,224 bytes, 129 lines download raw bytes

1// ハンバーガーメニュー
2class Ios15ModalHack {
3  constructor() {
4    this.init();
5    this.load();
6    this.resize();
7  }
8  init() {
9    const styleTag = document.createElement('style');
10    styleTag.innerText = '@media (max-width: 768px) {html.is-locked,html.is-locked body {height: calc(var(--window-inner-height) + ${window.scrollY}px - 1px);overflow: hidden;box-sizing: border-box;}}';
11    document.getElementsByTagName('head')[0].insertAdjacentElement('beforeend', styleTag);
12  }
13  syncHeight() {
14    document.documentElement.style.setProperty('--window-inner-height', `${window.innerHeight}px`);
15  }
16  load() {
17    window.addEventListener('load', () => {
18      this.syncHeight();
19    });
20  }
21  resize() {
22    // if (navigator.userAgent.match(/iPhone|Android.+Mobile/)) {
23    //   return;
24    // } else {
25    window.addEventListener('resize', () => {
26      this.syncHeight();
27    });
28    // }
29  }
30}
31const App = new Ios15ModalHack();
32
33$(".openbtn").click(function () {
34	$(this).toggleClass('is-active');
35	$(".l-header__nav__wrap").toggleClass('is-panelactive');
36	$("html").toggleClass('is-locked');
37});
38$(".l-header__nav a").click(function () {
39	$(".openbtn").removeClass('is-active');
40	$(".l-header__nav__wrap").removeClass('is-panelactive');
41	$("html").removeClass('is-locked');
42});
43
44// ヘッダー位置調整
45$(window).on('load', function() {
46	let headerHeight = $('.l-header').outerHeight() + 80;
47	let urlHash = location.hash;
48	if (urlHash) {
49		let position = $(urlHash).offset().top - headerHeight;
50		$('html, body').animate({ scrollTop: position }, 0);
51	}
52});
53const headerFunc = ()=>{
54	let headerHeight = $('.l-header').outerHeight() + 80;
55	let urlHash = location.hash;
56	if (urlHash) {
57		let position = $(urlHash).offset().top - headerHeight;
58		$('html, body').animate({ scrollTop: position }, 0);
59	}
60}
61window.addEventListener('hashchange', headerFunc, false);
62
63// mv swiper
64const mvSwiper = new Swiper(".p-mv__swiper", {
65	slidesPerView: 1,
66	loop: true,
67	// updateOnWindowResize: true,
68	pagination: {
69		el: ".swiper-pagination",
70		clickable: true,
71	},
72	effect: 'fade',
73	fadeEffect: {
74		crossFade: true,
75	},
76	speed: 800,
77	autoplay: {
78		delay: 4000,
79		disableOnInteraction: false,
80	},
81	on: {
82		setTransition: function () {
83			$('.p-mv__swiper').toggleClass('mvanime');
84		},
85		slideChangeTransitionStart: function () {
86			if ($('.swiper-slide.last').hasClass('swiper-slide-active')) {
87				$('.p-mv__ttl').css('opacity', '0');
88			} else {
89				$('.p-mv__ttl').css('opacity', '1');
90			}
91		},
92	}
93});
94
95// purpose slider
96const purposeSlider = new Swiper(".p-purpose__swiper", {
97  loop: true,
98  loopedSlides: 4,
99  slidesPerView: "auto",
100  speed: 8000,
101  autoplay: {
102    delay: 0,
103    disableOnInteraction: false,
104  },
105});
106
107// gym slider
108const gymSlider = new Swiper(".p-gym__swiper", {
109  loop: true,
110  loopedSlides: 4,
111  slidesPerView: "auto",
112  speed: 8000,
113  autoplay: {
114    delay: 0,
115    disableOnInteraction: false,
116  },
117});
118
119// interview
120$('.p-interview__item__ttl').on('click', function(){
121	$(this).parent().toggleClass('is-open');
122	$(this).next().slideToggle();
123});
124
125// requipment
126$('.p-requipment__ttl').on('click', function(){
127	$(this).parent().toggleClass('is-open');
128	$(this).next().slideToggle();
129});

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.