1document.addEventListener("DOMContentLoaded", function() { 2 var questions = document.querySelectorAll(".faq-question"); 3 questions.forEach(function(question) { 4 question.addEventListener("click", function() { 5 var answer = this.nextElementSibling; 6 var icon = this.querySelector('.toggle-icon'); 7 if (answer.style.display === "block") { 8 answer.style.display = "none"; 9 icon.textContent = '+'; 10 history.pushState(null, null, ' '); 11 } else { 12 var allAnswers = document.querySelectorAll(".faq-answer"); 13 allAnswers.forEach(function(ans) { 14 ans.style.display = "none"; 15 }); 16 17 var allIcons = document.querySelectorAll('.toggle-icon'); 18 allIcons.forEach(function(ic) { 19 ic.textContent = '+'; 20 }); 21 22 answer.style.display = "block"; 23 icon.textContent = '-'; 24 var faqItem = this.parentElement; 25 var faqId = faqItem.getAttribute('id'); 26 history.pushState(null, null, '#' + faqId); 27 } 28 }); 29 }); 30 31 var hash = window.location.hash; 32 if (hash) { 33 var target = document.querySelector(hash + " .faq-answer"); 34 var targetIcon = document.querySelector(hash + " .toggle-icon"); 35 if (target) { 36 target.style.display = "block"; 37 if (targetIcon) { 38 targetIcon.textContent = '-'; 39 } 40 window.scrollTo(0, target.offsetTop); 41 } 42 } 43 44 // Handle filter toggling 45 var modeLinks = document.querySelectorAll(".ekeybionyxfaq-modes a"); 46 modeLinks.forEach(function(link) { 47 link.addEventListener("click", function(event) { 48 event.preventDefault(); 49 var currentUrl = new URL(window.location.href); 50 var params = new URLSearchParams(currentUrl.search); 51 var mode = params.get("bionyx_mode"); 52 53 if (mode === this.getAttribute("data-mode")) { 54 params.delete("bionyx_mode"); 55 } else { 56 params.set("bionyx_mode", this.getAttribute("data-mode")); 57 } 58 59 params.delete("paged"); // Remove pagination if any 60 61 window.location.search = params.toString(); 62 }); 63 }); 64 65 // Handle dropdown change 66 var dropdown = document.getElementById("categories-dropdown"); 67 if (dropdown) { 68 dropdown.addEventListener("change", function() { 69 var selectedCategory = this.value; 70 var currentUrl = new URL(window.location.href); 71 var params = new URLSearchParams(currentUrl.search); 72 73 if (selectedCategory) { 74 params.set("faq_kategorie", selectedCategory); 75 } else { 76 params.delete("faq_kategorie"); 77 } 78 79 window.history.replaceState(null, null, "?" + params.toString()); 80 location.reload(); 81 }); 82 } 83 84 // Dynamische Trennung der Mode-Icons 85 var modeIcons = document.querySelectorAll('.mode-icon'); 86 modeIcons.forEach(function(icon) { 87 var modes = icon.getAttribute('data-mode'); 88 89 // Prüfen, ob mehrere Modi durch Leerzeichen oder Kommas getrennt sind 90 if (modes.includes('plus mode') && modes.includes('local mode')) { 91 // Ursprünglichen Inhalt leeren 92 icon.innerHTML = ''; 93 94 // Plus Mode Span erstellen 95 var plusModeSpan = document.createElement('span'); 96 plusModeSpan.className = 'mode-icon'; 97 plusModeSpan.setAttribute('data-mode', 'plus mode'); 98 plusModeSpan.textContent = 'Plus Mode'; 99 icon.appendChild(plusModeSpan); 100 101 // Leerzeichen hinzufügen 102 icon.appendChild(document.createTextNode(' ')); 103 104 // Local Mode Span erstellen 105 var localModeSpan = document.createElement('span'); 106 localModeSpan.className = 'mode-icon'; 107 localModeSpan.setAttribute('data-mode', 'local mode'); 108 localModeSpan.textContent = 'Local Mode'; 109 icon.appendChild(localModeSpan); 110 } 111 }); 112});
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.