PageSourceSearch

https://goulash.tech/wp-content/themes/goulash/components/banner/script.js?ver=1789460384

js goulash.tech collected 2026-09-24 10:48:30 UTC 1,046 bytes, 49 lines download raw bytes

1document.addEventListener('DOMContentLoaded', function () {
2	var banner = document.getElementById('custom-banner');
3	if (!banner) return;
4
5	var storageKey = 'goulash_banner_dismissed';
6	var dismissed = false;
7
8	try {
9		dismissed = sessionStorage.getItem(storageKey) === '1';
10	} catch (e) {
11		dismissed = false;
12	}
13
14	var dismiss = function () {
15		dismissed = true;
16		banner.classList.remove('visible');
17
18		try {
19			sessionStorage.setItem(storageKey, '1');
20		} catch (e) {
21			/* ignore private mode / quota */
22		}
23	};
24
25	var closeBtn = banner.querySelector('.banner-close');
26	if (closeBtn) {
27		closeBtn.addEventListener('click', function (event) {
28			event.preventDefault();
29			event.stopPropagation();
30			dismiss();
31		});
32	}
33
34	var handleScroll = function () {
35		if (dismissed) {
36			banner.classList.remove('visible');
37			return;
38		}
39
40		if (window.scrollY > 50) {
41			banner.classList.add('visible');
42		} else {
43			banner.classList.remove('visible');
44		}
45	};
46
47	window.addEventListener('scroll', handleScroll, { passive: true });
48	handleScroll();
49});

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.