PageSourceSearch

https://www.der-ersatzteile-profi.de/ext/js/depui.js

js der-ersatzteile-profi.de collected 2026-10-09 01:48:44 UTC 22,066 bytes, 1,025 lines download raw bytes

1/* DEP UI Components & kleine Code Snippet & Frontend Anweisungen
2Alle DEP UI Elemente hier zusammenbringen
3NDongo Ndiaye - 04.01.2021
4*
5*
6*
7*
8
9*/
10
11/*Bootstrap 5 Integration Mobile suche 04.04.2024 sbö*/
12function customShowModal() {
13
14	var modal = document.getElementById('SuchContainer');
15	var searchTops = modal.querySelector('.searchtops');
16	var backdrop = document.createElement('div');
17	backdrop.classList.add('modal-backdrop', 'fade', 'show');
18	document.body.appendChild(backdrop);
19
20	modal.classList.add('show');
21	modal.style.display = 'block';
22
23	searchTops.style.display = 'block';
24}
25
26function customHideModal() {
27	var modal = document.getElementById('SuchContainer');
28	var searchTops = modal.querySelector('.searchtops');
29	var backdrop = document.querySelector('.modal-backdrop');
30	modal.classList.remove('show');
31	modal.style.display = 'none';
32	document.body.removeChild(backdrop);
33
34	searchTops.style.display = 'none';
35	window.location.reload();
36
37}
38
39/*  ende  04.04.2024 sbö*/
40
41/* Crosselling mehr-weniger Button sbö */
42
43function toggleTextCross(uniqueId, flexItemId) {
44	let button = document.getElementById('btn_' + uniqueId);
45	let collapseDiv = document.getElementById(uniqueId);
46	let flexItemDiv = document.getElementById(flexItemId);
47
48
49	collapseDiv.addEventListener('shown.bs.collapse', function () {
50		button.innerText = "weniger";
51		flexItemDiv.style.height = "auto";
52
53	});
54
55	collapseDiv.addEventListener('hidden.bs.collapse', function () {
56		button.innerText = "mehr";
57		flexItemDiv.style.height = "500px";
58	});
59}
60
61/* Links Maskierung -  */
62/*$(document).ready(function () {
63
64	var prg = $('.prg');
65
66	prg.click(function () {
67
68		var redirectForm = $('#redirform');
69		var redirectValue = $('#redirdata');
70
71		redirectValue.val($(this).data('href'));
72		redirectForm.submit();
73
74	});
75
76
77});*/
78$(document).ready(function () {
79
80	$('.prg').click(function (e) {
81
82		var href = $(this).data('href');
83
84		if (typeof href === 'undefined' || href === '') {
85			return true;
86		}
87
88		e.preventDefault();
89
90		$('#redirdata').val(href);
91		$('#redirform').submit();
92
93		return false;
94	});
95
96});
97
98/* Stiky Navigation */
99
100/*$(window).scroll(function () {
101	if ($(window).scrollTop() >= 300) {
102		$('#nav_bar').addClass('fixed_header');
103
104	} else {
105		$('#nav_bar').removeClass('fixed_header');
106
107	}
108});*/
109const teilEins = document.querySelector(".teil_eins");
110
111if (teilEins) {
112	window.addEventListener("scroll", function () {
113		if (window.scrollY > 100) {
114			teilEins.classList.add("d-none");
115		} else {
116			teilEins.classList.remove("d-none");
117		}
118	});
119}
120
121// Size 
122
123var ScreenSizeuser = $(window).width();
124window.addEventListener('resize', setWindowSize);
125
126function setWindowSize() {
127	if (typeof (window.innerWidth) == 'number') {
128		ScreenSizeuser = window.innerWidth;
129		DepHeight = window.innerHeight;
130	} else {
131		if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
132			ScreenSizeuser = document.documentElement.clientWidth;
133			DepHeight = document.documentElement.clientHeight;
134		} else {
135			if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
136				ScreenSizeuser = document.body.clientWidth;
137				DepHeight = document.body.clientHeight;
138			}
139		}
140	}
141}
142
143// Unique Array Function - Clean ein Array
144
145function onlyUnique(value, index, self) {
146	return self.indexOf(value) === index;
147}
148
149
150// Function um Land von der IP zu checken - NND
151function DepipLookup() {
152	fetch('https://extreme-ip-lookup.com/json/')
153		.then(res => res.json())
154		.then(response => {
155
156
157			if (response.countryCode === 'AT') {
158
159				const dep_phone = document.querySelectorAll('.dep_phone');
160				for (let i = 0; i < dep_phone.length; i++) {
161					$(dep_phone[i]).html('+49 2161 639 80 70');
162				}
163			}
164		})
165		.catch((data, status) => {
166			console.log('Kein Ergebnis - oder null IP');
167		})
168}
169
170DepipLookup();
171
172// Ende ip Lockup Funktion  - TESTING NND
173
174
175var pointerEventToXY = function (e) {
176	var out = {x: 0, y: 0};
177	if (e.type == 'touchstart' || e.type == 'touchmove' || e.type == 'touchend' || e.type == 'touchcancel') {
178		var touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
179		out.x = touch.pageX;
180		out.y = touch.pageY;
181	} else if (e.type == 'mousedown' || e.type == 'mouseup' || e.type == 'mousemove' || e.type == 'mouseover' || e.type == 'mouseout' || e.type == 'mouseenter' || e.type == 'mouseleave') {
182		out.x = e.pageX;
183		out.y = e.pageY;
184	}
185	return out;
186}
187
188
189/*
190// Touchdown event action
191$('#SucheModal').on('mousedown', function(e){
192
193     let Top = pointerEventToXY(e);
194
195
196    $("#SucheModal").css({
197       top: Top.y + 'px'
198   });
199
200    Depui.swipeModal('SuchContainer');
201    // $("#SuchContainer").modal('hide');
202
203
204
205});
206
207*/
208
209
210/*
211var $element = $("#SucheModal");
212
213$("#SucheModal").on({
214    'touchstart mousedown': function (e) {
215		
216		 //console.log($(e.currentTarget).height());
217       var xPos = e.originalEvent.touches[0].pageX;
218       var yPos = e.originalEvent.touches[0].pageY;
219		
220		console.log(yPos);
221		
222        $(this).on('touchmove mousemove', move);
223        move(e);  //you could do `$(this).trigger('touchmove', e)` but a conventional function call keeps `move` simple.
224    },
225    'touchend mouseup': function (e) {
226        $(this).off('touchmove mousemove');
227		
228    }
229});
230
231function move(e) {
232	
233	
234	
235	$element.css({
236		height: $(e.currentTarget).height() + 'px'
237	});
238	
239	
240	
241  	//e.currentTarget.height()
242}
243*/
244
245
246// Ende Movement check
247
248
249function getCurrent(touch) {
250	// check if the touch coords are in the position of one of the cells and which one
251	var a = matrix.filter(function (obj) {
252		var b = (
253			touch.clientX > obj.left &&
254			touch.clientX < obj.right &&
255			touch.clientY < obj.bottom &&
256			touch.clientY > obj.top
257		);
258
259		return b;
260	});
261
262	return a.length > 0 ? a[0].e : null;
263}
264
265
266// Input Menge erhöhen oder reduzieren -  Also plus oder minus - für die retoure Seite
267function InputPlusMinus(incrementor, target, max) {
268
269
270	var value = parseInt(document.getElementById(target).value, 10);
271
272	var Input = document.getElementById(target);
273
274	value = isNaN(value) ? 0 : value;
275
276	if (incrementor < 0) {
277		if (value > 1) {
278			value += incrementor;
279
280		}
281	} else {
282		value += incrementor;
283	}
284
285
286	if (value > max) {
287
288		Input.value = max;
289
290	} else {
291		Input.value = value;
292	}
293
294}
295
296
297// erstellt eich Artikel Row mit check Box, EpNummer, Bezeichnung - für die retour Seite 
298function addTrow(name, nummer, price, oenr, qty) {
299
300
301	let OENR;
302
303	if (oenr !== null) {
304
305		OENR = `<span class="uk-text-muted"> ${oenr} </span>`;
306	} else {
307
308		OENR = '';
309	}
310
311
312	let Anzah;
313
314	if (qty > 1) {
315
316		Anzah = `<a onclick="InputPlusMinus(-1, '${nummer}', ${qty})" uk-icon="icon: minus; ratio: .75" class="uk-icon"></a>`;
317
318		Anzah += `<input type="number" name="retoure_quantity[]" value="${qty}" class="uk-input tm-quantity-input" id="${nummer}" disabled>`;
319
320		Anzah += `<a onclick="InputPlusMinus(+1, '${nummer}', ${qty})" uk-icon="icon: plus; ratio: .75" class="uk-icon"></a>`;
321
322	} else {
323
324
325		Anzah = `<input type="number" name="retoure_quantity" value="${qty}" class="uk-input tm-quantity-input" id="${nummer}" disabled>`;
326
327	}
328
329
330	var Feld = '<input class="uk-checkbox" value="' + nummer + '" name="ep_nummer" type="checkbox">';
331	var Nummer = '<div class="col-xs-12 col-sm-8">  <h4 class="uk-text-light uk-remove-margin">' + Feld + ' ' + name + OENR + ' </h4> <small class="uk-text-meta">Art.-Nr.: ' + nummer + '</small>  <div> ' + Anzah + ' </div></div>';
332
333	var Price = '<div class="col-xs-12 col-sm-4 text-right"> ' + price + ' </div>';
334
335	var Row = document.createElement('div');
336	Row.classList.add('col-sm-6', 'uk-margin-bottom', 'col-xs-12');
337	Row.innerHTML = '<div class="uk-card uk-card-body uk-card-default uk-card-small">' + Nummer + Price + '</div>';
338
339
340	return Row;
341}
342
343
344/* Artikel Detaiseite - grüne Box-Artikel in den Warenkorb */
345
346if (ScreenSizeuser > 768) {
347
348	$(window).scroll(function () {
349
350		if ($(window).scrollTop() >= 1250) {
351			$('#bottomCart').removeClass('hide_fixed_card');
352			$('#bottomCart').addClass('show_fixed_cart');
353
354		} else {
355			$('#bottomCart').removeClass('show_fixed_cart');
356			$('#bottomCart').addClass('hide_fixed_card');
357
358		}
359	});
360
361}
362
363/* Suche Klasse */
364
365
366class Depui {
367
368
369	// Toggle accordeon
370	static OpenClosAccor(e) {
371		const elID = e.target.dataset.accor;
372
373
374		$('#' + elID).toggleClass('uk-hidden', 1200);
375		$(this).find('.plus_minus').toggleClass('uk-hidden', 1200);
376
377
378	}
379
380	static SucheZeigen() {
381
382
383		var SuchContainer = document.querySelector('#SuchContainer');
384		var SuchModalCont = document.querySelector('#SucheModal');
385		// var ModalBody = document.querySelector('.modal-body');
386		var CloseMe = document.querySelector('.closeme');
387		var searchtops = document.querySelector('.searchtops');
388
389		SuchModalCont.classList.add('modal-content');
390
391		SuchContainer.classList.remove('hidden-xs');
392		SuchContainer.classList.add('modal');
393
394		CloseMe.classList.remove('hidden');
395
396
397		$(SuchContainer).modal("show");
398
399		$(searchtops).fadeIn();
400
401
402	}
403
404
405	static swipeModal(e) {
406
407		const elem = document.querySelector(`#${e}`);
408
409		$(elem).fadeOut('slow');
410
411		setTimeout(function () {
412			$(elem).modal("hide");
413		}, 700);
414
415	}
416
417
418	static Modalshow(e) {
419
420		const elem = document.querySelector(`#${e}`);
421
422		$(elem).modal('show');
423
424
425	}
426
427
428	// Startet die Suche wenn auf Top Suche geklickt wird - Nur Mobile sich
429	static topSearchGo(e) {
430
431		var element = e.target;
432
433		var id = element.id;
434
435		var Spinner = `<i class="fa fa-circle-o-notch fa-spin"></i>`;
436
437		element.innerHTML = Spinner;
438
439
440		var form = document.forms["quick_find"];
441
442		var input = document.querySelector("#search_words");
443		var inputMobile = document.querySelector("#search_words_mobil");
444		const searchtops = document.querySelector('.searchtops');
445
446
447		if (id === input.id) {
448
449			$(searchtops).fadeOut();
450
451		} else if (id === inputMobile.id) {
452			$(searchtops).fadeOut();
453		} else {
454
455
456			input.value = e.target.dataset.suchetop;
457			form.submit();
458		}
459
460	}
461
462}
463
464
465// im Browser speichern
466
467class DepStore {
468
469	// Suchanfrage aus Browser Storag holen
470
471	static getLastsearch() {
472
473		let SearTerms;
474
475		if (localStorage.getItem('SearTerms') === null) {
476
477			SearTerms = [];
478		} else {
479
480			SearTerms = JSON.parse(localStorage.getItem('SearTerms'));
481		}
482
483
484		return SearTerms;
485
486	}
487
488
489	static addSearchterm(SearTerm) {
490
491
492		var form = document.querySelector('#SuchFormular');
493		var formMobil = document.querySelector('#SuchFormularMobil');
494
495		const SearTerms = DepStore.getLastsearch();
496
497		SearTerms.push(SearTerm);
498
499		localStorage.setItem('SearTerms', JSON.stringify(SearTerms));
500
501		if (window.innerWidth < 768 && formMobil) {
502			formMobil.submit();
503		} else if (form) {
504			form.submit();
505		}
506
507	}
508
509
510	// Letzte Suche auflisten
511	static addTotopSearch() {
512
513
514		if (localStorage.getItem('SearTerms') !== null) {
515
516
517			var Storage = JSON.parse(localStorage.getItem('SearTerms'));
518
519
520			var uniquelist = Storage.filter(onlyUnique);
521
522
523			var LastSuchelist = document.querySelector('#UserLastSuche');
524
525			uniquelist.slice(-5).forEach(function (element) {
526				var lastItem = document.createElement('div');
527				lastItem.classList.add('topsearchgo', 'top_search_btn');
528				lastItem.dataset.suchetop = element;
529
530				lastItem.textContent = element;
531
532				LastSuchelist.appendChild(lastItem);
533
534
535			});
536
537		}
538	}
539
540}
541
542
543// Suche Initieren
544
545$(document).ready(function () {
546
547	// Top Suche  hinzufügen
548
549	DepStore.addTotopSearch();
550
551	// Trustedshop hinzufügen
552
553	$(window).one('scroll', LoadTrusted());
554
555	// Old Code from Bottom
556
557
558	$('.btn_list_tog').click(function (e) {
559
560		e.preventDefault();
561		e.stopPropagation();
562
563		if (this.id) {
564
565			var id = this.id.replace('id_', '');
566			var info_block = $('div.block_' + id);
567
568			info_block.toggleClass('hidden-xs');
569
570			/*info_block.toggle(); */
571			$(this).children('i').toggleClass('fa-minus');
572
573		}
574
575
576	});
577
578
579	$(".Mob_btn_to").click(function () {
580
581		$(this).next('.top_modelle_pher').toggleClass('hidden-xs');
582		$(this).children('i').toggleClass('fa-minus');
583
584	});
585
586	$(".footer-title, .Mob_btn_to").click(function () {
587
588		$(this).siblings('.top_modelle_pher').toggleClass('hidden-xs');
589
590		$(this).parent().find('.Mob_btn_to i').toggleClass('fa-plus fa-minus');
591	});
592
593
594	/* User Navi collapse  */
595
596
597	$('.user_navi_links').toggle();
598	$(".user_navi").click(function () {
599
600		$(this).next().slideToggle(300);
601		$(this).children('span').toggleClass('fa-minus');
602
603	});
604
605
606	// Breadcrum mehr anzeigen
607	$(".bread_more").click(function () {
608
609		$('.hide_me').toggleClass('hidden-xs');
610		$(this).children('i').toggleClass('fa-angle-down');
611
612	});
613
614
615	$(".Text_toogle_btn").click(function () {
616
617		$(this).prev('.toggle_text').slideToggle(300);
618		$(this).children('i').toggleClass('fa-angle-up');
619
620	});
621
622
623	/* Mein Fahrzeug -  gewähltes Fahrzeug   //  info_block.is(':visible')? info_block.hide(): info_block.show();*/
624
625
626	$("#MeinFhzZeigen").click(function () {
627
628		$("#Auswahl_blocl").slideToggle(300);
629		$(this).children('i').toggleClass('fa-angle-down fa-angle-up');
630	});
631
632	$("#Show_hersteller").click(function () {
633
634		$(".hersteller_block").slideToggle(300);
635		$(this).children('i').toggleClass('fa-angle-down fa-angle-up');
636	});
637
638
639	/*  Couter für Menge Produkt Listing - $('.toggle_text').toggle();*/
640
641	$('.list_minus').click(function () {
642		var $input = $(this).parent().parent().find('input');
643		var count = parseInt($input.val()) - 1;
644		count = count < 1 ? 1 : count;
645		$input.val(count);
646		$input.change();
647		return false;
648	});
649	$('.list_plus').click(function () {
650		var $input = $(this).parent().parent().find('input');
651		$input.val(parseInt($input.val()) + 1);
652		$input.change();
653		return false;
654	});
655
656	// Add Spinner -  Suche checkbox input
657	$(".check_block_mark").click(function () {
658
659		$(this).find('.checkmarkmot').removeClass("checkmarkmot").addClass("fa fa-circle-o-notch fa-spin");
660
661
662	});
663
664
665	// ShowModal Box  Modalshow -- liefer_spedi
666
667
668	$(".open_this_modal").click(function (e) {
669		Depui.Modalshow(e.target.dataset.modal);
670
671	});
672
673
674	// Pkw infp - navi und accordeons
675
676
677	/*	PKW Details - Fahrzeug Info als Block anzeigen*/
678	$('.pkw_icon').click(function (e) {
679		e.preventDefault();
680		e.stopPropagation();
681		if (this.id) {
682			$('div.pkw_over_info').each(function () {
683				$(this).hide();
684			});
685			var id = this.id.replace('id_', '');
686			var info_block = $('div.pkw_' + id);
687			info_block.is(':visible') ? info_block.hide() : info_block.show();
688
689		} else {
690			$('.pkw_over_info').toggle();
691
692		}
693
694
695	});
696
697	$('.pkw_over_info').click(function (e) {
698		e.stopPropagation();
699	});
700	$(document).on('click keydown', function (e) {
701		if (e.keyCode == 27 || e.type == 'click') {
702			$('.pkw_over_info').hide();
703			$(".tooltiptext").hide();
704
705		}
706	});
707	/*	Info Block End  $(this).css("background-color", "#f3c800");	*/
708
709	$('.close_pkw').click(function () {
710
711		$(this).parent().hide();
712
713
714	});
715
716
717	$('.product-container').hover(function () {
718		$(this).children('.z-text').css('top', '0').fadeToggle(200);
719	});
720	$('.Att_plusicon').click(function () {
721		$('.z-text').css('top', '0').fadeToggle(200);
722	});
723	$('.close_att').click(function () {
724		$(this).parent('.z-text').toggle();
725
726	});
727
728
729	// Old Code from Bottom Ende
730
731	// Suche. Suggestion
732	var options = {
733		/* url: "ajax/searchdata.json",  */
734		url: function (phrase) {
735			return "ajax/suggestions.php?term=" + phrase;
736
737		},
738		list: {
739			match: {enabled: false},
740			maxNumberOfElements: 15,
741			onClickEvent: function () {
742
743				wfromAutocomplete();
744
745				//document.forms["quick_find"].submit();
746			},
747			onKeyEnterEvent: function () {
748
749				wfromAutocomplete();
750				//document.forms["quick_find"].submit();
751			}
752		},
753		theme: "yellow-light"
754
755	};
756	$("#search_words").easyAutocomplete(options);
757	$("#search_words_mobil").easyAutocomplete(options);
758});
759
760
761// such Inpus aus autocompleter holen
762
763function wfromAutocomplete() {
764
765	var suchFeld = $("#search_words").val();
766	var suchFeldMobile = $("#search_words_mobil").val();
767
768	DepStore.addSearchterm(suchFeld);
769	DepStore.addSearchterm(suchFeldMobile);
770
771
772}
773
774
775// Pass Suchanfrage to localStorage
776
777
778$("#SuchFormular").submit(function (e) {
779
780	e.preventDefault();
781
782	let sTerm = $("#search_words").val();
783	let sTermMobil = $("#search_words_mobil").val();
784
785	DepStore.addSearchterm(sTerm);
786	DepStore.addSearchterm(sTermMobil);
787
788
789});
790
791/* Simple Meldung zu machen und in Session speichern */
792
793function DepMeldunOff() {
794
795	$("#coockiePoliy").hide();
796	request = $.ajax({
797		url: "ajax/coockies.php",
798		type: "post",
799		data: 'meldungoff'
800	});
801
802	/* callback handler that will be called on success  */
803	request.done(function (response, textStatus, jqXHR) {
804
805
806	});
807
808	/* callback handler that will be called on failure */
809	request.fail(function (jqXHR, textStatus, errorThrown) {
810
811		console.error(
812			"das ging schief: " +
813			textStatus, errorThrown
814		);
815	});
816};
817
818
819function DepCloseInfo() {
820
821
822	$("#meldungTop").hide();
823	request = $.ajax({
824		url: "ajax/close_info.php",
825		type: "post",
826		data: 'closeinfo'
827	});
828
829
830	request.done(function (response, textStatus, jqXHR) {
831
832
833	});
834
835
836	request.fail(function (jqXHR, textStatus, errorThrown) {
837
838		console.error(
839			"das ging schief: " +
840			textStatus, errorThrown
841		);
842	});
843};
844
845
846// Katalog nur bei small device suchen und in die Navi packen -- 
847
848if (ScreenSizeuser < 769) {
849
850// Element der Katalog Navi in Canvas Navi hinzufügen - Autoteile
851	const katalog = document.querySelector('#Katalog');
852
853	if (katalog) {
854
855		const newKatalog = document.querySelector('#menuAutoteile');
856
857		katalog.className = '';
858
859		newKatalog.appendChild(katalog);
860	}
861
862// Elemente der Zubehör und Werkzeug Navi
863
864	const MenuKategorie = document.querySelector('#CategorieMenu');
865
866	if (MenuKategorie) {
867
868		let MenuElID = MenuKategorie.classList[1];
869
870		var menuZubWerk = document.querySelector(`#${MenuElID}`);
871		menuZubWerk.appendChild(MenuKategorie);
872	}
873
874
875}
876
877
878// Meine Bestellung-info -  Betelldetaiils - Lieferdaten und Bezahldaten anzeigen
879
880$('.bestelldetail_info').click(Depui.OpenClosAccor);
881
882
883// Navi für Mobile Menü
884var navigator = menu.navigation({
885	// selectedClass: 'Selected',
886	// slidingSubmenus: true,
887	// theme: 'dark',
888	title: 'Menü & Katalog'
889});
890
891
892var drawer = menu.offcanvas({
893	// position: 'left'
894});
895
896//	Open the menu. opencamenu --  a[href="#menu"]
897
898const OpenMenuCanva = document.querySelectorAll('.opencamenu');
899
900for (let i = 0; i < OpenMenuCanva.length; i++) {
901
902
903	OpenMenuCanva[i].addEventListener('click', evnt => {
904		evnt.preventDefault();
905		//drawer.open();
906
907		if (document.body.classList.contains('mm-ocd-opened')) {
908			// Menü opened → close
909			drawer.close();
910		} else {
911			// Menü closed → open
912			drawer.open();
913		}
914
915
916	});
917}
918
919// User Login und Register Click event - Click aus der Canvas Menu
920
921$('.openlogin_register').click(function () {
922
923	drawer.close();
924
925	setTimeout(function () {
926		$('#UserAnmeldung').modal('show');
927	}, 700);
928
929});
930
931
932// Display container - Suche als  Modal Box anzeigen bei Mobile
933const ToSuchebtn = document.querySelector('#toSuchBox');
934if (ToSuchebtn) {
935	ToSuchebtn.addEventListener('click', Depui.SucheZeigen);
936}
937/*ToSuchebtn.addEventListener('click', Depui.SucheZeigen);*/
938
939// Close Modal container - 
940
941
942$(".closeme").click(function (e) {
943
944	Depui.swipeModal(e.target.dataset.close);
945
946});
947
948
949$(document).on("click", ".topsearchgo", (function (e) {
950
951	Depui.topSearchGo(e);
952}));
953
954
955if (ScreenSizeuser < 768) {
956
957	const inputSuche = document.querySelector("#search_words");
958	inputSuche.addEventListener('click', Depui.topSearchGo);
959
960	const inputSucheMobil = document.querySelector("#search_words_mobil");
961	inputSucheMobil.addEventListener('click', Depui.topSearchGo);
962}
963
964
965// Trusted Shop
966
967function LoadTrusted() {
968	console.log("TrustedShop initialisiert");
969
970	const tsid = "X6C07F35E34F30427636A5FED75FD1D4D";
971
972	// Global config object
973	window._tsConfig = {
974		yOffset: "150",               // offset from page bottom
975		variant: "reviews",           // text, default, small, reviews, custom, custom_reviews
976		customElementId: "",          // required for custom variants
977		trustcardDirection: "",       // topRight, topLeft, bottomRight, bottomLeft
978		customBadgeWidth: "",         // 40–90 px
979		customBadgeHeight: "",        // 40–90 px
980		disableResponsive: "false",   // deactivate responsive behaviour
981		disableTrustbadge: "false",   // deactivate trustbadge
982		trustCardTrigger: "mouseenter"// or 'click'
983	};
984
985	// Erstellen Script element
986	const tsScript = document.createElement("script");
987	tsScript.src = `https://widgets.trustedshops.com/js/${tsid}.js`;
988	tsScript.async = true; // für performans async
989	tsScript.defer = true;
990	tsScript.charset = "utf-8";
991
992	// 'LastScript'
993	const insertBeforeEl = document.getElementById("LastScript")
994		|| document.getElementsByTagName("script")[0]
995		|| document.body;
996
997	insertBeforeEl.parentNode.insertBefore(tsScript, insertBeforeEl);
998}
999
1000function closeCanvasMenu() {
1001	drawer.close();
1002
1003}
1004
1005document.addEventListener('click', function (e) {
1006
1007	if (document.body.classList.contains('mm-ocd-opened')) {
1008		const overlay = document.querySelector('.mm-ocd');
1009		const drawerEl = document.querySelector('.mm-ocd__content');
1010
1011		if (overlay && overlay.contains(e.target) && !drawerEl.contains(e.target)) {
1012			drawer.close();
1013		}
1014	}
1015});
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025

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.