PageSourceSearch

https://parish-frankfurt.de/_assets/afda9b37bbbb38d3e0a775c098bcb126/Js/news.js

js parish-frankfurt.de collected 2026-10-02 22:46:09 UTC 1,922 bytes, 58 lines download raw bytes

1// JS FUNCS FOR NEWS TEMPLATE
2/* eslint-disable */
3function bookmarkPage() {
4  /* eslint-enable */
5  if (window.sidebar && window.sidebar.addPanel) {
6    // Firefox
7    window.sidebar.addPanel(document.title, window.location.href, '');
8  } else if (window.external && 'AddFavorite' in window.external) {
9    // IE
10    window.external.AddFavorite(location.href, document.title);
11  } else if (window.opera && window.print) {
12    // Opera
13    let bookmarkLink = document.createElement('a');
14
15    bookmarkLink.rel = 'sidebar';
16    bookmarkLink.href = window.location.href;
17    bookmarkLink.title = document.title;
18    bookmarkLink.innerHTML = '<span>Bookmark this page</span>';
19    document.body.appendChild(bookmarkLink);
20  } else {
21    // Other browsers (mainly WebKit - Chrome/Safari)
22    alert(
23      `Drücke ${
24        navigator.userAgent.toLowerCase().indexOf('mac') !== -1
25          ? 'Command/Cmd'
26          : 'STRG'
27      } + D, um diese Seite als Lesezeichen hinzu zufügen.`,
28    );
29  }
30}
31
32document.querySelectorAll('.js-bookmark').forEach(function (button) {
33  button.addEventListener('click', bookmarkPage);
34});
35
36const shariff = document.querySelector('.news-page-sharing');
37const btnShariffWrapper = document.querySelector('.btn-shariff-wrapper');
38const newsSidebar = document.querySelector('.news-sidebar');
39
40function addSlideDown() {
41  shariff.classList.add('slidedown');
42}
43
44if (btnShariffWrapper instanceof Element && shariff instanceof Element) {
45  btnShariffWrapper.addEventListener('click', addSlideDown);
46  btnShariffWrapper.addEventListener('focus', addSlideDown);
47  document.addEventListener('click', function (e) {
48    if (!e.target.closest('.shariff-wrapper, .btn-shariff-wrapper')) {
49      shariff.classList.remove('slidedown');
50    }
51  });
52
53  if (newsSidebar instanceof Element) {
54    newsSidebar.addEventListener('focusin', function () {
55      shariff.classList.remove('slidedown');
56    });
57  }
58}

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.