PageSourceSearch

https://www.mattaricocoro.com/wp-content/themes/jinr/lib/js/followwidget.js?ver=7.1.2

js mattaricocoro.com collected 2026-10-04 04:39:40 UTC 2,810 bytes, 69 lines download raw bytes

1document.addEventListener('DOMContentLoaded', function () {
2	/**
3	 * 追尾ウィジェット
4	 * - ヘッダーが追尾しているかどうかで付与する値を変更する
5	 */
6	const trackingElement = document.getElementById('sideBarTracking');
7	const headerElement = document.getElementById('commonHeader');
8	let attrTopvalue = '';
9	if (!headerElement) return;
10	if(trackingElement){
11		if(headerElement.classList.contains('d--header-tracking-on') && headerElement.classList.contains('d--header-layout1')){
12			const headerHeight = headerElement.clientHeight;
13			attrTopvalue = headerHeight + 15;
14			trackingElement.style.top = attrTopvalue + 'px';
15		} else {
16			trackingElement.style.top = 15 + 'px';
17		}
18	}
19	/**
20	 * ヘッダー追従
21	 * スクロールでふわっと表示させる
22	 */
23
24	let ticking = false;
25	const scrollElement = document.querySelector('#commonHeader');
26	const scrollElementParts = document.querySelector('.a--header-style-parts');
27	
28	if (!ticking) {
29		if(!scrollElement) return;
30		if(scrollElement.classList.contains('d--header-tracking-on') && scrollElement.classList.contains('d--header-layout1')){
31			function JinrHeaderScrollAnimation() {
32				requestAnimationFrame(function () {
33					ticking = false;
34					if (window.pageYOffset > 1050) {
35						scrollElement.classList.remove("js--follow-header-display-off");
36						scrollElement.classList.add("js--follow-header-display");
37					} else if (scrollElement.classList.contains("js--follow-header-display")) {
38						scrollElement.classList.remove("js--follow-header-display");
39						scrollElement.classList.add("js--follow-header-display-off");
40					} else if (window.pageYOffset < 300) {
41						scrollElement.classList.remove("js--follow-header-display-off");
42					}
43				});
44				ticking = true;
45			}
46			document.addEventListener('scroll', JinrHeaderScrollAnimation, { passive: true });
47		}
48		if(!scrollElementParts) return;
49		if(scrollElementParts.classList.contains('d--header-tracking-on') && scrollElement.classList.contains('d--header-layout1')){
50			
51			function JinrHeaderScrollAnimation() {
52				requestAnimationFrame(function () {
53					ticking = false;
54					if (window.pageYOffset > 1050) {
55						scrollElementParts.classList.remove("js--follow-header-display-off");
56						scrollElementParts.classList.add("js--follow-header-display");
57					} else if (scrollElementParts.classList.contains("js--follow-header-display")) {
58						scrollElementParts.classList.remove("js--follow-header-display");
59						scrollElementParts.classList.add("js--follow-header-display-off");
60					} else if (window.pageYOffset < 300) {
61						scrollElementParts.classList.remove("js--follow-header-display-off");
62					}
63				});
64				ticking = true;
65			}
66			document.addEventListener('scroll', JinrHeaderScrollAnimation, { passive: true });
67		}
68	}
69});

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.