PageSourceSearch

https://www.brainhealth-partnership.eu/wp-content/plugins/wp-plugi…/assets/js/cookie-banner.js?ver=1790345054

js brainhealth-partnership.eu collected 2026-10-04 00:21:24 UTC 2,060 bytes, 76 lines download raw bytes

1// add helper css class to privacy note if we detect a 62.5% font-size
2( function () {
3	const currentFontSize = window.getComputedStyle(
4		document.getElementsByTagName( 'html' )[ 0 ]
5	)[ 'font-size' ];
6	if ( currentFontSize === '10px' ) {
7		document
8			.getElementById( 'privacy-note' )
9			.classList.add( 'sixtytwo-point-five-percent' );
10	}
11} )();
12
13// eslint-disable-next-line no-undef
14jQuery( function ( $ ) {
15	const isHTTPS = window.location.protocol !== 'http:';
16	const $privacyNote = $( '#privacy-note' );
17
18	if ( $privacyNote.length > 0 ) {
19		const noteHasOverflow = () => {
20			const rect = $privacyNote[ 0 ].getBoundingClientRect();
21			return rect.y < 0;
22		};
23
24		if ( -1 !== document.cookie.indexOf( 'matomooptin' ) ) {
25			$privacyNote.hide();
26		} else {
27			$privacyNote.prependTo( 'body' ).show();
28			if ( noteHasOverflow() ) {
29				$( 'body' ).addClass( 'noscroll' );
30			}
31			$privacyNote
32				.find( '.privacy-note-ok' )
33				.on( 'click keydown', function ( e ) {
34					if (
35						e.type === 'keydown' &&
36						e.which !== 13 &&
37						e.which !== 32
38					) {
39						return;
40					}
41					const expires = new Date();
42					expires.setDate( expires.getDate() + 1 ); // 24 hours
43					document.cookie =
44						'matomooptin=1;path=/;' +
45						( isHTTPS ? 'secure;' : '' ) +
46						'samesite=strict;expires=' +
47						expires.toUTCString();
48					document.dispatchEvent(
49						new CustomEvent( 'matomooptin_activated', {} )
50					);
51					$( 'body' ).removeClass( 'noscroll' );
52					$privacyNote.slideUp();
53				} );
54			$privacyNote
55				.find( '.privacy-note-discard' )
56				.on( 'click keydown', function ( e ) {
57					if (
58						e.type === 'keydown' &&
59						e.which !== 13 &&
60						e.which !== 32
61					) {
62						return;
63					}
64					const expires = new Date();
65					expires.setDate( expires.getDate() + 1 ); // 24 hours
66					document.cookie =
67						'matomooptin=0;path=/;' +
68						( isHTTPS ? 'secure;' : '' ) +
69						'samesite=strict;expires=' +
70						expires.toUTCString();
71					$( 'body' ).removeClass( 'noscroll' );
72					$privacyNote.slideUp();
73				} );
74		}
75	}
76} );

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.