PageSourceSearch

https://www.praesenzstelle-velten.de/typo3temp/assets/compressed/m…45b54047f680ed15e510ac4638.js.gz?1790003378

js praesenzstelle-velten.de collected 2026-10-07 06:01:24 UTC 6,757 bytes, 215 lines download raw bytes

1
2"use strict";
3
4function handleErrors() {
5  console.log(JSON.stringify(arguments));
6}
7
8// mobile nav and search toggle
9var navToggle = document.querySelector('.js-toggle-nav'),
10  navContainer = document.querySelector('.nav-main'),
11  navLinksFirstLevel = document.querySelectorAll('.nav-item-level-1'),
12  searchToggle = document.querySelector('.js-toggle-search'),
13  searchToggleDesktop = document.querySelector('.js-toggle-search-desktop'),
14  searchInput = document.querySelector('#ke_search_searchfield_sword'),
15  searchSubmit = document.querySelector('#ke_search_searchfield_submit'),
16  searchContainer = document.querySelector('.container-search'),
17  triggerConsent = document.querySelector(".js-trigger-consent");
18if (window.innerWidth < 992) {
19  // not tab-able first level links if mobile nav is present and closed
20  for (let i = 0; i < navLinksFirstLevel.length; i++) {
21    navLinksFirstLevel[i].setAttribute('tabindex', '-1');
22  }
23}
24if (navToggle) {
25  navToggle.onclick = function () {
26    navToggle.classList.toggle('toggle-active');
27    navContainer.classList.toggle('mobile-active');
28    // change tabbindex for mobile nav on toggle
29    if (navContainer.classList.contains('mobile-active')) {
30      for (let i = 0; i < navLinksFirstLevel.length; i++) {
31        navLinksFirstLevel[i].setAttribute('tabindex', '0');
32      }
33    } else {
34      for (let i = 0; i < navLinksFirstLevel.length; i++) {
35        navLinksFirstLevel[i].setAttribute('tabindex', '-1');
36      }
37    }
38  };
39}
40if (searchToggle) {
41  searchToggle.onclick = function () {
42    searchToggle.classList.toggle('toggle-active');
43    searchToggleDesktop.classList.toggle('toggle-active');
44    searchContainer.classList.toggle('search-active');
45    searchInput.setAttribute('tabindex', '0');
46    searchSubmit.setAttribute('tabindex', '0');
47  };
48}
49if (searchToggleDesktop) {
50  searchToggleDesktop.onclick = function () {
51    searchToggle.classList.toggle('toggle-active');
52    searchToggleDesktop.classList.toggle('toggle-active');
53    searchContainer.classList.toggle('search-active');
54    document.getElementById('ke_search_searchfield_sword').focus();
55    searchInput.setAttribute('tabindex', '0');
56    searchSubmit.setAttribute('tabindex', '0');
57  };
58}
59const makeAllButCurrentSlideInert = function makeAllButCurrentSlideInert() {
60  const currentSlideEl = this.slides[this.realIndex];
61  this.slides.each((slide, index) => {
62    if (slide.classList.contains(this.params.slideActiveClass)) {
63      slide.removeAttribute("inert");
64    } else {
65      slide.setAttribute("inert", "");
66    }
67  });
68};
69
70// image gallery masonry layout
71if (document.getElementsByClassName('image-gallery').length) {
72  setTimeout(function () {
73    var gallery = document.querySelector('.image-gallery');
74    var msnry = new Masonry(gallery, {
75      // options
76      itemSelector: '.item',
77      percentPosition: true,
78      horizontalOrder: true
79    });
80  }, 100);
81
82  // image gallery gallery functions
83  new SimpleLightbox({
84    elements: '.image-gallery a[rel="image"]'
85  });
86}
87
88// init slider for news list
89if (document.getElementsByClassName('js-news-list-slider').length) {
90  var sliderNewsList = tns({
91    container: '.js-news-list-slider',
92    controls: false,
93    navPosition: 'bottom',
94    autoplay: false,
95    //autoplayTimeout: 10000,
96    //autoplayHoverPause: true,
97    //autoplayButtonOutput: false,
98    mouseDrag: true
99  });
100}
101
102// init slider for events list
103if (document.getElementsByClassName('js-events-list-slider').length) {
104  var sliderEventsList = tns({
105    container: '.js-events-list-slider',
106    items: 1,
107    mouseDrag: true,
108    slideBy: "page",
109    controls: false,
110    swipeAngle: false,
111    navPosition: 'bottom',
112    responsive: {
113      768: {
114        items: 3
115      }
116    }
117  });
118}
119
120// init slider for element introslider
121// keyvisual slider
122const swiperIntroSlider = new Swiper(".js-introslider-init", {
123  slidesPerView: 1,
124  loop: true,
125  autoHeight: true,
126  pagination: {
127    el: ".swiper-pagination",
128    clickable: true
129  },
130  keyboard: {
131    enabled: true
132  },
133  autoplay: {
134    delay: 10000
135  },
136  on: {
137    // init() {
138    //     makeAllButCurrentSlideInert.call(this);
139    // },
140    // slideChange() {
141    //     makeAllButCurrentSlideInert.call(this);
142    // },
143    slideChangeTransitionEnd() {
144      makeAllButCurrentSlideInert.call(this);
145      // if (this.slides[this.realIndex]) {
146      //     const currentSlideEl = this.slides[this.realIndex];
147      //     currentSlideEl.setAttribute("tabindex", "-1");
148      //     try {
149      //         currentSlideEl.focus();
150      //     } catch (e) {
151      //
152      //     }
153      // }
154    }
155  }
156});
157
158// init to top button if scrolled
159const scrollToTopButton = document.getElementById('totopbutton');
160const scrollFunc = () => {
161  // Get the current scroll value
162  let y = window.scrollY;
163
164  // If the scroll value is greater than the window height, let's add a class to the scroll-to-top button to show it!
165  if (y > 0) {
166    scrollToTopButton.className = "link-to-top show";
167  } else {
168    scrollToTopButton.className = "link-to-top hide";
169  }
170};
171window.addEventListener("scroll", scrollFunc);
172function enableOsm(consent) {
173  if (consent) {
174    const event = new CustomEvent('loadOsm');
175    document.dispatchEvent(event);
176
177    // hide helping anchornav for maps after consent is given (because then we have pins ons the map to change)
178    if (document.getElementsByClassName('ttaddress_anchornav').length) {
179      const hiddenMapNav = document.querySelectorAll(".js-anchornav-link");
180      document.getElementById('ttaddress__records').classList.add('hide-place');
181      document.getElementById('ttaddress__mapcontainer').classList.remove('map-fallback');
182      for (let i = 0; i < hiddenMapNav.length; i++) {
183        hiddenMapNav[i].tabIndex = -1;
184      }
185    }
186  }
187}
188
189// change map locations with helping anchor nav if consent is not given
190document.addEventListener('click', function (event) {
191  if (!event.target.matches('.js-anchornav-link')) {
192    return;
193  }
194  event.preventDefault();
195  var element = event.target;
196  $('.ttaddress__label').addClass('hide-place');
197  $('#ttaddress__label-' + element.getAttribute('data-id')).removeClass('hide-place');
198  $('.ttaddress__label a').each(function () {
199    $(this).attr('tabindex', -1);
200  });
201  $('#ttaddress__label-' + element.getAttribute('data-id') + ' a').each(function () {
202    $(this).removeAttr('tabindex');
203  });
204});
205
206// trigger consent manually with button
207if (triggerConsent) {
208  triggerConsent.addEventListener("click", function () {
209    orejime.show();
210  });
211}
212// the fallbacks are shown only after click, then the tabindex is reset to allow tabbing to them
213$('.ttaddress__mapcontainer .ttaddress__label a').each(function () {
214  $(this).attr('tabindex', -1);
215});

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.