1 2 3 4 5 6 7 8(function () { 9 // Welche PLZ-Felder sollen eingeschränkt werden? 10 const ZIP_INPUT_IDS = [ 11 'billingAddressAddressZipcode', 12 'shippingAddressAddressZipcode' 13 ]; 14 15 function restrictZipInput(input) { 16 if (!input) return; 17 18 // nicht doppelt initialisieren 19 if (input.dataset.plzRestriction === '1') return; 20 input.dataset.plzRestriction = '1'; 21 22 // HTML-Attribute (hilft auch mobil) 23 input.setAttribute('inputmode', 'numeric'); 24 input.setAttribute('autocomplete', 'postal-code'); 25 input.setAttribute('maxlength', '5'); 26 input.setAttribute('pattern', '\\d{4,5}'); 27 28 const normalize = () => { 29 // nur Ziffern, max 5 30 input.value = (input.value || '').replace(/\D+/g, '').slice(0, 5); 31 }; 32 33 // Eingabe & Paste (Paste erlaubt) 34 input.addEventListener('input', normalize, { passive: true }); 35 input.addEventListener('paste', () => setTimeout(normalize, 0)); 36 37 // optionaler Extra-Schutz beim Tippen 38 input.addEventListener('keypress', function (e) { 39 const ch = String.fromCharCode(e.which || e.keyCode); 40 if (!/^\d$/.test(ch) || input.value.length >= 5) e.preventDefault(); 41 }); 42 43 // falls schon was drinsteht 44 normalize(); 45 } 46 47 function applyGermanZipRestriction() { 48 for (const id of ZIP_INPUT_IDS) { 49 restrictZipInput(document.getElementById(id)); 50 } 51 } 52 53 // beim ersten Laden 54 document.addEventListener('DOMContentLoaded', applyGermanZipRestriction); 55 56 // Shopware Checkout rendert teils dynamisch -> nachladen/neu-renders abfangen 57 document.addEventListener('change', applyGermanZipRestriction); 58 document.addEventListener('ajaxComplete', applyGermanZipRestriction); // falls vorhanden 59 60 // Zusätzlich: einmal sofort probieren (falls Script spät geladen wird) 61 applyGermanZipRestriction(); 62})(); 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83(function () { 84 var CLAMP_PX = 16 * 12; 85 var LABELS = { 86 de: 'Weiterlesen', en: 'Read more', nl: 'Lees meer', es: 'Leer más', fr: 'Lire la suite', 87 it: 'Leggi di più', pl: 'Czytaj wiÄcej', cs: 'ÄÃst dále', sk: 'ÄÃtaÅ¥ Äalej', da: 'Læs mere', 88 fi: 'Lue lisää', el: 'ÎιαβάÏÏε ÏεÏιÏÏÏÏεÏα', lv: 'LasÄ«t vairÄk', lt: 'Skaityti daugiau', 89 ro: 'CiteÈte mai mult', sv: 'Läs mer', pt: 'Ler mais', bg: 'ÐÑоÑеÑи повеÑе', 90 hr: 'ProÄitaj viÅ¡e', hu: 'Tovább olvasom', no: 'Les mer', nn: 'Les mer', nb: 'Les mer' 91 }; 92 function label() { 93 var l = (document.documentElement.lang || 'en').slice(0, 2).toLowerCase(); 94 return LABELS[l] || LABELS.en; 95 } 96 function init(el) { 97 if (el.dataset.mediReadMore) return; 98 el.dataset.mediReadMore = '1'; 99 if (el.scrollHeight <= CLAMP_PX + 40) return; 100 el.classList.add('medi-clamp'); 101 var btn = document.createElement('button'); 102 btn.type = 'button'; 103 btn.className = 'medi-read-more-btn'; 104 btn.textContent = label(); 105 btn.setAttribute('aria-expanded', 'false'); 106 el.insertAdjacentElement('afterend', btn); 107 btn.addEventListener('click', function () { 108 el.classList.remove('medi-clamp'); 109 btn.setAttribute('aria-expanded', 'true'); 110 btn.remove(); 111 }); 112 } 113 function scan() { 114 document.querySelectorAll('.card-tabs .tab-pane .product-detail-description-text').forEach(function (el) { 115 if (el.offsetParent !== null) init(el); 116 }); 117 } 118 if (document.readyState === 'loading') { 119 document.addEventListener('DOMContentLoaded', scan); 120 } else { scan(); } 121 document.addEventListener('shown.bs.tab', scan); 122 document.addEventListener('shown.bs.collapse', scan); 123})(); 124 125 126 127document.addEventListener("DOMContentLoaded", function() { 128 const percentageSpan = document.querySelector('.list-price-percentage'); 129 const badge = document.querySelector('.list-price-badge'); 130 131 if (percentageSpan && badge) { 132 // Extrahiert nur die Zahl aus dem Text (z.B. "12" aus "(12% gespart)") 133 const text = percentageSpan.textContent; 134 const match = text.match(/(\d+)/); 135 if (match) { 136 badge.innerText = `-${match[1]}%`; 137 } 138 } 139}); 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156document.addEventListener('DOMContentLoaded', () => { 157 158 // Only run if the viewport is 576px or smaller 159 if (window.innerWidth > 576) return; 160 161 const container = document.querySelector('.top-bar .top-bar-marketing .item-entry'); 162 if (!container) return; 163 164 const spans = container.querySelectorAll('span');
165 if (spans.length < 2) return; 166 167 let currentIndex = 0; 168 169 // Initial state: Make the first span active 170 spans.forEach((span, i) => { 171 span.classList.remove('active', 'exit'); 172 if (i === 0) span.classList.add('active'); 173 }); 174 175 function rotateClaims() { 176 // Double check width in case window was resized 177 if (window.innerWidth > 576) return; 178 179 const current = spans[currentIndex]; 180 current.classList.remove('active'); 181 current.classList.add('exit'); 182 183 currentIndex = (currentIndex + 1) % spans.length; 184 const next = spans[currentIndex]; 185 186 next.classList.remove('exit'); 187 next.classList.add('active'); 188 189 setTimeout(() => { 190 current.classList.remove('exit'); 191 }, 600); 192 } 193 194 setInterval(rotateClaims, 4000); 195 196}); 197 198 199
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.