PageSourceSearch

https://www.tyszkiewicz.pl/js/cookies.js?ver=268117

js tyszkiewicz.pl collected 2026-10-07 20:44:46 UTC 2,275 bytes, 69 lines download raw bytes

1// Cookies info START //
2
3function addLoadEvent() {
4	var oldonload = window.onload;
5	
6	if (typeof window.onload != 'function') {
7		window.onload = cookiesAccept;
8	} else {
9		window.onload = function() {
10			if (oldonload) { oldonload(); }
11			cookiesAccept();
12
13		}
14	}
15} 
16
17addLoadEvent();
18
19function cookiesAccept() {
20	checkCookie();
21	
22	function getCookie(c_name) {
23		var i, x, y, ARRcookies = document.cookie.split(";");
24
25		for (i = 0; i < ARRcookies.length; i++) {
26			x = ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
27			y = ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
28			x = x.replace(/^\s+|\s+$/g,"");
29			if (x == c_name) { return unescape(y); }
30		}
31	}
32
33	function setCookie() {
34		var exdate = new Date();
35		exdate.setDate(exdate.getDate() + 365);
36		var c_value = escape('1') + ((365==null) ? "" : "; expires=" + exdate.toUTCString());
37
38		document.cookie = 'cookies_info' + "=" + c_value;
39		document.getElementById('cookie_info').style.display = 'none';
40	}
41
42	function checkCookie() {
43		var cookies_info = getCookie("cookies_info");
44		
45		var title_info = 'INFORMACJA DOTYCZĄCA PLIKÓW COOKIES';
46		var text_info = 'Strona korzysta z plików cookies. Możesz określić warunki dostępu lub przechowywania plików cookies w Twojej przeglądarce.';
47		
48		if (cookies_info == null || cookies_info == "") { 
49			var cookiesContainer = document.createElement("div");
50				cookiesContainer.setAttribute("id", "cookie_info");
51				cookiesContainer.innerHTML = '<a id="close_info_cookie"><p>X</p></a><div id="user_information"><div class="user_information_nag">'+ title_info +'</div><div class="user_information_text">'+ text_info +'</div></div>';			
52
53			document.getElementsByTagName("body").item(0).appendChild(cookiesContainer);
54
55			var newlink = document.createElement("style");
56				newlink.setAttribute("rel", "stylesheet");
57				newlink.setAttribute("type", "text/css");
58				newlink.innerHTML = "";
59
60			document.getElementsByTagName("head").item(0).appendChild(newlink);
61
62			var element = document.getElementById('close_info_cookie');
63			if (element.addEventListener) { element.addEventListener('click', function() { setCookie() } , false); }
64			else if (element.attachEvent) { element.attachEvent('onclick', function() { setCookie() }); }
65		}
66	}
67}
68
69// Cookies info STOP

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.