PageSourceSearch

https://www.autofunke.de/typo3temp/assets/t3sbootstrap_91329b858b.js?1786870792

js autofunke.de collected 2026-10-07 05:17:39 UTC 5,742 bytes, 203 lines download raw bytes

1
2// Scroll anchor - Main.html
3function t3sbScrollToAnchor(sectionmenuAnchorOffset, fixedNavbar, navbarHeight, sectionhash=false) {
4	var hash = window.location.hash;
5	if (sectionhash) {
6		hash = sectionhash;
7	}
8	if (hash.length) {
9		var idArr = hash.split('#');
10		var targetElement = document.getElementById(idArr[1]);
11		if ( targetElement === null ) {
12			idArr = hash.split('#c');
13			targetElement = document.getElementById('tab-'+idArr[1]);
14		}
15		if ( targetElement != null ) {
16			var	offsetSize = sectionmenuAnchorOffset;
17			if ( fixedNavbar ) {
18				offsetSize += navbarHeight;
19			}
20			var scrollTo = Math.round(t3sbOffsetTop(targetElement)-offsetSize);
21			window.scroll({ top: scrollTo, behavior: 'smooth' });
22		}
23	}
24}
25
26function t3sbOffsetTop(el) {
27	var rect = el.getBoundingClientRect(),
28		scrollTop = window.pageYOffset || document.documentElement.scrollTop;
29		return rect.top + scrollTop;
30}
31
32
33
34// Loading spinner - Main.html
35function t3sbFadeOutEffect(fadeTarget) {
36	var fadeEffect = setInterval(function () {
37		if (!fadeTarget.style.opacity) {
38			fadeTarget.style.opacity = 1;
39		}
40		if (fadeTarget.style.opacity > 0) {
41			fadeTarget.style.opacity -= 0.1;
42		} else {
43			clearInterval(fadeEffect);
44		}
45	}, 60);
46	fadeTarget.classList.add('d-none');
47}
48	
49
50
51// Magnifying glass icon - Main.html
52function t3sbMagnifying(img, viewportWidth, navbarBreakpointWidth) {
53	var zoomOverlay = img.parentElement.parentElement.querySelectorAll('div.zoom-overlay');
54	if ( zoomOverlay.length ) {
55		var imgwidth = Math.round(img.getBoundingClientRect().width)+'px',
56			imgheight = img.clientHeight+'px';
57		if ( viewportWidth < navbarBreakpointWidth ) {
58			imgwidth = '100%';
59		}
60		zoomOverlay[0].classList.add('card-img-overlay');
61		if ( imgwidth ) {
62			zoomOverlay[0].style.maxWidth = imgwidth;
63		}
64		if ( imgheight ) {
65			zoomOverlay[0].style.maxHeight = imgheight;
66		}
67	}
68}
69	
70
71
72// Link to top - Main.html
73function t3sbScrollToTop() {
74	document.addEventListener('scroll', t3sbHandleScroll);
75}
76
77function t3sbHandleScroll() {
78	var scrollToTopBtn = document.querySelector('.back-to-top'),
79		scrollTop = window.pageYOffset || document.documentElement.scrollTop;
80	if (scrollToTopBtn != null) {
81		scrollToTopBtn.addEventListener('click', t3sbScrollIt);
82		if (scrollTop > 100) {
83			scrollToTopBtn.classList.add('st-block');
84			scrollToTopBtn.classList.remove('st-none');
85		} else {
86			scrollToTopBtn.classList.add('st-none');
87			scrollToTopBtn.classList.remove('st-block');
88		}
89	}
90}
91
92function t3sbScrollIt(e) {
93	e.preventDefault();
94	window.scroll({ top: 0, behavior: 'smooth' });
95}
96	
97
98
99// Extra Row - Navbar/Assets.html
100function t3sbExtraRow(vw, bp) {
101	let extraRow = document.querySelector('.navbar .extra-row');
102	if (extraRow) {
103		if ( vw < bp ) {
104			extraRow.classList.add('flex-row','me-auto','mt-4','mb-0');
105			extraRow.classList.remove('ms-auto');
106		} else {
107			extraRow.classList.remove('flex-row','me-auto','mt-4','mb-0');
108			extraRow.classList.add('ms-auto');
109		}
110	}
111}
112	
113
114
115// Dropdown animate - Navbar/Assets.html
116function t3sbDropdownAnimate(vw, bp, dropdownAnimateValue) {
117	if ( vw < bp ) {
118		document.querySelectorAll('.dd-animate-'+dropdownAnimateValue).forEach(function(dda) {
119			dda.classList.remove('dd-animate-'+dropdownAnimateValue);
120			dda.classList.add('removed-animate-'+dropdownAnimateValue);
121		});
122	} else {
123		document.querySelectorAll('.removed-animate-'+dropdownAnimateValue).forEach(function(dda) {
124			dda.classList.add('dd-animate-'+dropdownAnimateValue);
125			dda.classList.remove('removed-animate-'+dropdownAnimateValue);
126		});
127	}
128}
129	
130
131
132function ready(fn) {
133	if (document.readyState != 'loading'){
134fn();
135	} else {
136document.addEventListener('DOMContentLoaded', fn);
137	}
138}
139ready(() => {
140	// Default - Main.html
141	const navbar = document.getElementById('main-navbar'),
142		  navbarHeight = navbar.clientHeight,
143		  navbarBreakpointWidth = document.body.getAttribute('data-navbar-breakpointwidth'),
144		  viewportWidth = parseFloat(getComputedStyle(document.querySelector('html'), null).width.replace("px", "")),
145		  onePageLayout = navbar.classList.contains('sectionMenu');
146
147	var fixedNavbar = false;
148
149	if ( navbar.classList.contains('fixed-top') || navbar.classList.contains('sticky-top') ) {
150		fixedNavbar = true;
151	}
152
153	// Scroll anchor - Main.html
154	if (window.location.hash) {
155		t3sbScrollToAnchor(29, fixedNavbar, navbarHeight);
156	}
157		
158
159	// Loading spinner - Main.html
160	window.onload = function() {
161		let spinner = document.getElementById('site-preloader');
162		t3sbFadeOutEffect(spinner);
163	};
164
165
166	// Magnifying glass icon - Main.html
167	var magnify = document.querySelectorAll('.zoom-overlay');
168	if ( magnify.length ) {
169		document.querySelectorAll('figure.image').forEach (
170			img => { t3sbMagnifying(img, viewportWidth, navbarBreakpointWidth) }
171		)
172	}
173			
174
175	// Link to top - Main.html
176	t3sbScrollToTop();
177
178
179	// Extra row - Navbar/Assets.html
180	t3sbExtraRow(viewportWidth, navbarBreakpointWidth);
181	window.addEventListener('resize', function(event) {
182		resizedViewportWidth = parseFloat(getComputedStyle(document.querySelector('html'), null).width.replace("px", ""));
183		t3sbExtraRow(resizedViewportWidth, navbarBreakpointWidth);
184	}, true);
185
186
187	// Dropdown animate - Navbar/Assets.html
188	t3sbDropdownAnimate(viewportWidth, navbarBreakpointWidth, 1);
189	window.addEventListener('resize', function(event) {
190		resizedViewportWidth = parseFloat(getComputedStyle(document.querySelector('html'), null).width.replace("px", ""));
191		t3sbDropdownAnimate(resizedViewportWidth, navbarBreakpointWidth, 1);
192	}, true);
193
194
195	// Carousel - Page/Assets.html
196	var carousels = document.querySelectorAll('.carousel .carousel-inner .carousel-item:first-child');
197	if ( carousels.length ) {
198		carousels.forEach( carousel => {
199			carousel.classList.add('active');
200		});
201	}
202
203});

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.