PageSourceSearch

https://motivmonster.de/public/theme/javascripts/system/Build/index.js?bust=f1cef370810b5b2474a29157ac601762

js motivmonster.de collected 2026-10-06 18:03:42 UTC 6,460 bytes, 179 lines download raw bytes

1/* MotivMonster: EU-Gewaehrleistungshinweis auf der Produktseite aufklappbar (Markup: html/custom/product_info_product_box_bottom.html).
2   Ohne JS bleibt der Hinweis sichtbar; erst hier wird "eingeklappt" gesetzt. Fehlt das Element, passiert nichts.
3   Rechtliche Zulaessigkeit der eingeklappten Darstellung pruefen lassen. */
4(function () {
5	'use strict';
6	function init() {
7		var boxes = document.querySelectorAll('[data-mm-garan]');
8		Array.prototype.forEach.call(boxes, function (box) {
9			if (box.getAttribute('data-mm-garan-init')) { return; }
10			var btn = box.querySelector('.mm-garan__toggle');
11			if (!btn) { return; }
12			box.setAttribute('data-mm-garan-init', '1');
13			function set(open) {
14				box.classList.toggle('is-collapsed', !open);
15				btn.setAttribute('aria-expanded', open ? 'true' : 'false');
16				btn.textContent = btn.getAttribute(open ? 'data-label-open' : 'data-label-closed');
17			}
18			box.classList.add('mm-garan--js');
19			set(false);
20			btn.addEventListener('click', function () {
21				set(btn.getAttribute('aria-expanded') !== 'true');
22			});
23		});
24	}
25	if (document.readyState === 'loading') {
26		document.addEventListener('DOMContentLoaded', init);
27	} else {
28		init();
29	}
30})();
31$(function() {
32  $("[data-toggle=menu]").on("click", function() {
33    if (!$("body").hasClass("show-menu")) {
34      $("#meco-overlay-menu").css("display", "block");
35      setTimeout(function() {
36        $("body").addClass("show-menu");
37      }, 50);
38      if (!$("#meco-overlay-menu #categories").length) {
39        $("#meco-overlay-menu").append($("#categories"));
40      }
41      if ($("#meco-overlay-menu #categories .navbar-categories-left").length > 1) {
42        $("#meco-overlay-menu #categories .navbar-categories-left:last").remove();
43      }
44    } else {
45      $("body").removeClass("show-menu");
46      setTimeout(function() {
47        $("#meco-overlay-menu").css("display", "none");
48      }, 500);
49      if (!$("#header #categories").length) {
50        $("#header").append($("#categories"));
51      }
52    }
53  });
54  function open_cart(e) {
55    e.preventDefault();
56    if (!$("body").hasClass("show-cart") && $("#cart-container:visible").length < 1) {
57      window.scrollTo(0, 0);
58      $("#offcanvas-cart-overlay").css("display", "block");
59      setTimeout(function() {
60        $("body").addClass("show-cart");
61      }, 50);
62    } else {
63      $("body").removeClass("show-cart");
64      $("a[data-toggle='cart']:visible").first().focus();
65      setTimeout(function() {
66        $("#offcanvas-cart-overlay").css("display", "none");
67      }, 500);
68    }
69    if (e.data.auto_close) {
70      setTimeout(close_cart, 3e3);
71    }
72  }
73  function close_cart() {
74    $("body").removeClass("show-cart");
75    $("a[data-toggle='cart']:visible").first().focus();
76    setTimeout(function() {
77      $("#offcanvas-cart-overlay").css("display", "none");
78    }, 500);
79  }
80  $("[data-toggle=cart]").on("click", { auto_close: false }, open_cart);
81  $("#offcanvas-cart-overlay").on("click", close_cart);
82  $(document).on("keyup", function(e) {
83    e.preventDefault();
84    e.stopPropagation();
85    if ((e.keyCode === 9 || e.keyCode === 27) && $(e.target).closest("#offcanvas-cart-content").length === 0) {
86      if ($("body").hasClass("show-cart") && $("#cart-container:visible").length === 0) {
87        close_cart();
88      }
89    }
90  });
91  $("body").on("CART_DROPDOWN_OPEN", { auto_close: true }, open_cart);
92  setTimeout(function() {
93    $("body").trigger("CART_DROPDOWN_UPDATE");
94  }, 1500);
95  if (!!navigator.userAgent.match(/Trident.*rv\:11\./)) {
96    $("body").addClass("ie11");
97  }
98  $('[data-wrap="false"]').each(function(index, carousel) {
99    $(carousel).on("slid.bs.carousel", function() {
100      let leftCarouselArrow = $(carousel).find(".left.carousel-control");
101      let rightCarouselArrow = $(carousel).find(".right.carousel-control");
102      let fistCarouselSlide = $(carousel).find(".item:first-child");
103      if (fistCarouselSlide.hasClass("active")) {
104        $(leftCarouselArrow).addClass("disabled");
105      } else {
106        $(leftCarouselArrow).removeClass("disabled");
107      }
108      let lastCarouselSlide = $(carousel).find(".item:last-child");
109      if (lastCarouselSlide.hasClass("active")) {
110        $(rightCarouselArrow).addClass("disabled");
111      } else {
112        $(rightCarouselArrow).removeClass("disabled");
113      }
114    });
115  });
116});
117$(function() {
118  $(document).on("click", ".js-garan-open", function(event) {
119    event.preventDefault();
120    var dialog = $(this).closest(".gm-garan-buybox, .gm-garan-checkout").find(".gm-garan-dialog")[0];
121    if (dialog && typeof dialog.showModal === "function") {
122      dialog.showModal();
123    }
124  });
125  $(document).on("click", ".js-garan-close", function() {
126    var dialog = $(this).closest(".gm-garan-dialog")[0];
127    if (dialog) {
128      dialog.close();
129    }
130  });
131  $(document).on("click", ".gm-garan-dialog", function(event) {
132    if (event.target === this) {
133      this.close();
134    }
135  });
136});
137/* MotivMonster: Footer-Spalten (.mm-footer-col) als Akkordeon auf <768px.
138   Markup: <section class="mm-footer-col"><h4><button aria-expanded aria-controls=ID>Titel</button></h4><div class="mm-footer-col__body" id=ID>
139   Desktop: alles offen, Button deaktiviert (reiner Titel). Mobil: einklappbar. Vanilla JS, fehlertolerant. */
140(function () {
141	'use strict';
142	var mq = window.matchMedia ? window.matchMedia('(max-width: 767px)') : null;
143	var cols = [];
144
145	function setOpen(c, open) {
146		c.col.classList.toggle('is-open', open);
147		c.btn.setAttribute('aria-expanded', open ? 'true' : 'false');
148	}
149
150	function apply() {
151		var mobile = !!(mq && mq.matches);
152		cols.forEach(function (c) {
153			c.btn.disabled = !mobile;
154			c.col.classList.toggle('mm-acc-col', mobile);
155			setOpen(c, !mobile);
156		});
157	}
158
159	function init() {
160		var nodes = document.querySelectorAll('#footer .mm-footer-col');
161		if (!nodes.length || !mq) { return; }
162		Array.prototype.forEach.call(nodes, function (col) {
163			var btn = col.querySelector('.mm-footer-col__btn');
164			if (!btn) { return; }
165			var c = { col: col, btn: btn };
166			btn.addEventListener('click', function () {
167				if (!mq.matches) { return; }
168				setOpen(c, !col.classList.contains('is-open'));
169			});
170			cols.push(c);
171		});
172		apply();
173		if (mq.addEventListener) { mq.addEventListener('change', apply); }
174		else if (mq.addListener) { mq.addListener(apply); }
175	}
176
177	if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', init); }
178	else { init(); }
179})();

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.