1let fixedImages = Array.from(document.getElementsByClassName('img-fixed')); 2let drawer; 3let htmlElement; 4 5fixedImages.forEach(image => { 6 let parent = image.parentElement; 7 let offsetTop = image.dataset.offsettop; 8 let offsetRight = image.dataset.offsetright 9 10 11 let currentTop = image.offsetTop; 12 let currentRight = window.innerWidth - (image.offsetLeft + image.innerWidth); 13 14 15 image.style.top = `${currentTop - offsetTop}px`; 16 image.style.right = `${currentRight - offsetRight}px`; 17 18}) 19 20 21function toggleText(button, id, language = 'cs') { 22 23 let readMoreText = 'ÄÃst vÃce'; 24 let readLessText = 'ÄÃst ménÄ'; 25 26 if (language = 'en') { 27 readMoreText = 'read more'; 28 readLessText = 'read less'; 29 } 30 31 let text = document.getElementById(id); 32 text.classList.toggle('active'); 33 34 if (text.classList.contains('active')) { 35 button.innerText = readLessText; 36 button.classList.add('active'); 37 38 return; 39 } 40 41 button.innerText = readMoreText; 42 button.classList.remove('active'); 43} 44 45 46function toggleTextMain(button, id) { 47 let text = document.getElementById(id); 48 text.classList.toggle('active'); 49 50 if (text.classList.contains('active')) { 51 button.innerText = 'ÄÃst ménÄ'; 52 button.classList.add('active'); 53 54 text.style.webkitLineClamp = 'unset'; 55 return; 56 } 57 58 text.style.webkitLineClamp = text.dataset.lineclamp; 59 button.innerText = 'ÄÃst vÃce'; 60 button.classList.remove('active'); 61} 62 63function toggleClass(target) { 64 target.classList.toggle('active'); 65} 66 67 68document.addEventListener('DOMContentLoaded', () => { 69 htmlElement = document.querySelector("html"); 70 71 drawer = document.querySelectorAll('.drawer')[0]; 72 drawer.addEventListener('click', (event) => { 73 stopProp(event); 74 }); 75 76 var dropdowns = Array.from(document.getElementsByClassName('has-children')); 77 var submenus = Array.from(document.getElementsByClassName('sub-menu')); 78 79 dropdowns.forEach(item => { 80 81 var link = item.querySelector('a'); 82 83 if (item.classList.toString().includes('menu-item-wpml')) { 84 link.removeAttribute('href'); 85 } 86 87 link.classList.add('nav-link'); 88 89 item.addEventListener('click', () => { 90 Array.from(item.getElementsByClassName('sub-menu'))[0].classList.toggle('active'); 91 item.classList.toggle('active'); 92 }) 93 94 submenus.forEach(item => { 95 item.addEventListener('click', (event) => { 96 event.stopPropagation(); 97 }) 98 99 }) 100 101 }) 102 103 loadPixelEvents() 104 setRowItemHeights(); 105}); 106 107function loadPixelEvents() { 108 let darujmeIframes = document.querySelectorAll("iframe[src*='darujme']"); 109 darujmeIframes.forEach(iframe => { 110 iframe.addEventListener('click', (event) => { 111 let submit = iframe.contentDocument.document.querySelectorAll('button.widget-submit')[0]; 112 113 console.log(submit); 114 }) 115 }) 116} 117 118function toggleDrawer(event) { 119 120 drawer.classList.toggle('active'); 121 document.body.classList.toggle('drawer-open'); 122 htmlElement.classList.toggle('overflow-y-hidden') 123 stopProp(event) 124} 125 126function closeDrawer() { 127 drawer.classList.remove('active'); 128 document.body.classList.remove('drawer-open'); 129 htmlElement.classList.remove('overflow-y-hidden') 130 131} 132 133document.addEventListener('click', (event) => { 134 drawer.classList.remove('active'); 135 document.body.classList.remove('drawer-open'); 136 htmlElement.classList.remove('overflow-y-hidden') 137}); 138 139function stopProp(event) { 140 event.stopPropagation(); 141} 142 143function scrollToSection(target) { 144 let targetElement = document.getElementsByClassName(target)[0]; 145 let yOffset = -30; 146 let targetY = targetElement.getBoundingClientRect().top + window.pageYOffset + yOffset; 147 148 window.scrollTo({ 149 top: targetY, 150 behavior: 'smooth' 151 }) 152} 153 154loadForms(); 155 156function loadForms() { 157 158 document.addEventListener('DOMContentLoaded', function () { 159 inputs = Array.from(document.getElementsByClassName('material-input')); 160
161 inputs.forEach(input => { 162 input.setAttribute('value', ''); 163 164 input.addEventListener('change', () => { 165 input.setAttribute('value', input.value) 166 }); 167 }); 168 }); 169} 170 171 172function setRowItemHeights() { 173 let imageRepeaters = Array.from(document.querySelectorAll('section.section-image-repeater')); 174 175 console.log(imageRepeaters) 176 177 imageRepeaters.forEach(repeater => { 178 let descriptions = Array.from(repeater.querySelectorAll('p.description')); 179 180 let heights = descriptions.map(desc => desc.clientHeight) 181 let maxHeight = Math.max.apply(null, heights); 182 183 console.log(maxHeight); 184 185 descriptions.forEach(description => { 186 description.style.height = maxHeight + 'px'; 187 }); 188 }); 189} 190 191function scrollToSectionGenK() { 192 193 if (window.innerWidth < 576) 194 section = 'donationColumn' 195 else 196 section = 'donationSection' 197 198 var target = document.getElementById(section); 199 200 target.scrollIntoView({ behavior: "smooth" }); 201 202 fbq('track', 'Donate'); 203 gtag('event', 'button_support', {}); 204 205 //, block: "end", inline: "nearest" 206 207 // var offset = 0; 208 209 // console.log(target); 210 // console.log(target.offsetTop); 211 // console.log(target.clientTop); 212 213 // window.scrollTo({ 214 // top: target.getBoundingClientRect().y - 48 + offset, 215 // behavior: 'smooth' 216 // }); 217} 218 219+function (w, d, s, u, a, b) { 220 w['DarujmeObject'] = u; 221 w[u] = w[u] || function () { (w[u].q = w[u].q || []).push(arguments) }; 222 a = d.createElement(s); b = d.getElementsByTagName(s)[0]; 223 a.async = 1; a.src = "https:\/\/www.darujme.cz\/assets\/scripts\/widget.js"; 224 b.parentNode.insertBefore(a, b); 225}(window, document, 'script', 'Darujme'); 226Darujme(1, "r57wysoyouz43p08", 'render', "https:\/\/www.darujme.cz\/widget?token=r57wysoyouz43p08", "380px"); 227
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.