PageSourceSearch

https://olafschenk.berlin/js/berlin2026/app.js?8418

js olafschenk.berlin collected 2026-10-05 11:28:02 UTC 4,456 bytes, 138 lines download raw bytes

1const moreLinks = document.querySelectorAll(".get-more-person");
2const personTeasers = document.querySelectorAll(".teaser__person");
3const menuCheckbox = document.querySelector('.menu__checkbox');
4
5const hideBodyClass = () => {
6	document.body.classList.remove('overflow-hidden');
7}
8
9menuCheckbox.addEventListener('change', (e) => {
10	if (!!e.target.checked) {
11		document.body.classList.add('overflow-hidden');
12	} else {
13		document.body.classList.remove('overflow-hidden');
14	}
15});
16
17window.addEventListener('resize', () => {
18	hideBodyClass();
19	menuCheckbox.checked = false;
20});
21
22moreLinks.forEach((element) => {
23	element.addEventListener('click', (e) => {
24		e.preventDefault();
25
26		const parent = element.closest('.teaser');
27		const teaserCloseButton = parent.querySelector('.teaser-close');
28
29		document.querySelectorAll('.teaser-close').forEach(el => el.classList.add('hidden'))
30
31		personTeasers.forEach(teaser => {
32			teaser.classList.remove('col-span-3', 'active');
33			teaser.removeAttribute('data-teaser-mode');
34		});
35		teaserCloseButton.addEventListener('click', (e) => {
36			e.target.classList.add('hidden');
37			parent.classList.remove('col-span-3', 'active');
38		});
39		parent.classList.add('col-span-3', 'active');
40		parent.setAttribute('data-teaser-mode', 'wide');
41		teaserCloseButton.classList.remove('hidden');
42
43		parent.scrollIntoView({
44			behavior: 'smooth',
45			block: 'center'
46		})
47	});
48});
49
50/* ExtraCode Sharkness */
51$(document).on( "click", ".newspages", function() {
52    var nr = $(this).attr("nr");
53	var nc = parseInt(nr) + 1;
54    var ismr = $(this).attr("ismr");
55    var fensterbreite = $(window).width();
56    var fensterhoehe  = $(window).height();
57	/*$('.section--news-list-items').hide();*/
58    if (fensterbreite>768) {
59        $('#newspage_'+ismr+'_'+nr).css("display","grid");
60		$('.nc' + nc).css("display","flex");
61    } else {
62        $('#newspage_'+ismr+'_'+nr).css("display","block");
63		$('.nc' + nc).css("display","block");
64    }
65    /*
66    $([document.documentElement, document.body]).animate({
67        scrollTop: $(".section--news-list").offset().top-50
68    }, 400);
69    */
70    $(this).hide();
71	$('#allnews_'+ismr+'_'+nr).hide();
72});
73
74$( document ).ready(function() {
75    var $grid = $('.socialwall2').isotope();
76    $grid.imagesLoaded().progress( function() { $grid.isotope(); });
77    
78    $('.filter-button-group').on( 'click', 'button', function() {
79      var filterValue = $(this).attr('data-filter');
80      $grid.isotope({ filter: filterValue });
81    });
82    
83    var filters = [];
84    $('.sm-filters').on( 'click', '.button-all', function( event ) {
85      var $this = $(this);
86      var $buttonGroup = $this.parents('.button-group-all');
87      var filterGroup = $buttonGroup.attr('data-filter-group');
88      filters[ filterGroup ] = $this.attr('data-filter');
89      var filterValue = concatValues( filters );
90      $grid.isotope({ filter: filterValue });
91    });
92    
93    $('.button-group-all').each( function( i, buttonGroup ) {
94        var $buttonGroup = $( buttonGroup );
95        $buttonGroup.on( 'click', 'button', function( event ) {
96            $buttonGroup.find('.is-checked').removeClass('is-checked');
97            var $button = $( event.currentTarget );
98            $button.addClass('is-checked');
99        });
100    });
101    
102    function concatValues( obj ) {
103      var value = '';
104      for ( var prop in obj ) { value += obj[ prop ]; }
105      return value;
106    }
107	setTimeout(function(){ $('.socialwall2').isotope(); }, 3000);
108});
109
110document.addEventListener("DOMContentLoaded", function() {
111    var textContainers = document.querySelectorAll('.sm-post_message');
112
113    textContainers.forEach(function(container) {
114        var text = container.querySelector('.smtext');
115        var link = container.querySelector('.smweiter');
116
117        var fullHeight = text.scrollHeight;
118        fullHeight = 84;
119        text.style.display = '-webkit-box';
120        text.style.webkitBoxOrient = 'vertical';
121        text.style.webkitLineClamp = '5';
122
123        var clippedHeight = text.scrollHeight;
124        
125        if (fullHeight < clippedHeight) {
126            link.style.display = 'block';
127        }
128
129        link.addEventListener('click', function() {
130            text.style.display = 'block';
131            text.style.webkitBoxOrient = 'initial';
132            text.style.webkitLineClamp = 'initial';
133            text.style.maxHeight = 'none';
134            link.style.display = 'none';
135			$('.socialwall2').isotope();
136        });
137    });
138});

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.