PageSourceSearch

https://visitmatsumoto.com/common/js/default.js

js visitmatsumoto.com collected 2026-10-02 04:21:49 UTC 1,113 bytes, 46 lines download raw bytes

1// JavaScript Document
2
3// ハンバーガーメニュー
4document.querySelector('#wrapper').insertAdjacentHTML('beforeend', '<menu id="navButton">Menu</menu>');
5document.querySelector('#navButton').addEventListener('click', function(){
6	var sel = document.querySelector('body');
7	if (sel.classList.contains('nav')) {
8		sel.classList.remove('nav');
9	} else {
10		sel.classList.add('nav');
11	}
12});
13
14
15// スクロール検知
16if (window.scrollY > 0) {
17	document.querySelector('body').classList.remove('scrollTop');
18}
19window.addEventListener('scroll', function(){
20	if (window.scrollY > 0) {
21		document.querySelector('body').classList.remove('scrollTop');
22	} else {
23		document.querySelector('body').classList.add('scrollTop');
24	}
25});
26
27
28// トップへ戻るリンク
29document.querySelector('#pageTop a').addEventListener('click', function(){
30	window.scroll({
31		top: 0,
32		behavior: 'smooth'
33	});
34});
35
36
37// 読み込み検知
38$(window).on('load',function(){
39	document.querySelector('body').classList.remove('do');
40	document.querySelector('body').classList.add('done')
41});
42
43
44
45
46

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.