PageSourceSearch

https://www.znamlek.pl/js/run.js?1789637702

js znamlek.pl collected 2026-09-25 00:29:07 UTC 6,046 bytes, 213 lines download raw bytes

1function randomString(len, charSet){
2    charSet = charSet || 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
3    var randomString = '';
4    for (var i = 0; i < len; i++) {
5    	var randomPoz = Math.floor(Math.random() * charSet.length);
6    	randomString += charSet.substring(randomPoz,randomPoz+1);
7    }
8    return randomString;
9}
10
11var idBg=null;
12var idCloud=null;
13
14function resizeCloud(mWidth,mHeight){
15	$("#"+idCloud).animate({ 'width': mWidth, 'height': mHeight,'margin-left': (mWidth/2)*(-1) });
16}
17
18function runCloud(txt,classStyle){
19	if (idBg==null){
20		idBg=randomString(10);
21		idCloud=randomString(10);
22
23		$("body").append('<div class="bgCover" id="'+idBg+'"></div>');
24		$("body").append('<div class="ajaxCover '+classStyle+'" id="'+idCloud+'"></div>');
25
26		$("#"+idCloud).html(txt);
27		$("#"+idCloud).css("width",$("#"+idCloud).outerWidth());
28		$("#"+idCloud).css("height",$("#"+idCloud).outerHeight());
29		$("#"+idCloud).css("top","50%");
30		$("#"+idCloud).css("margin-top",-parseInt($("#"+idCloud).outerHeight()/2));
31		$("#"+idCloud).append('<div class="closeCloud"></div>');
32	}
33}
34
35function runAjaxBoxContent(url, method, mData, mWidth, mHeight){
36	if (method=='undefined' || method==undefined || method==null) method='GET';
37	jQuery.ajax({
38		url:url,
39		type:method,
40		data: mData,
41		success: function(response){
42			$("#"+idCloud).html(response);
43			resizeCloud(mWidth,mHeight);
44		},
45		error:function(request, textStatus, errorThrown){ 
46			console.log(textStatus+" / "+errorThrown);
47			removeCloud();
48		}
49	});
50}
51
52function runAjaxBox(url,classStyle,mType,mData){
53	if (idBg==null){
54		if (mType==undefined || mType=='undefined') mType='GET';
55		jQuery.ajax({
56			url:url,
57			type:mType,
58			data: mData,
59			success: function(response){
60				runCloud(response,classStyle);
61			},
62			error:function(request, textStatus, errorThrown){ 
63				console.log(textStatus+" / "+errorThrown);
64				removeCloud();
65			}
66		});
67	}
68}
69
70function validateEmail(email) { 
71    var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
72    return re.test(email);
73}
74
75function validTxt(txt){
76	if ($.trim(txt).length>1) return true;
77	else return false;
78}
79
80/* tworzenie ciasteczek */
81function createCookie(name,value,days) {
82    if (days) {
83        var date = new Date();
84        date.setTime(date.getTime()+(days*24*60*60*1000));
85        var expires = "; expires="+date.toGMTString();
86    }
87    else var expires = "";
88    document.cookie = name+"="+value+expires+"; path=/";
89}
90
91/* odczytanie ciasteczka */
92function readCookie(name) {
93    var nameEQ = name + "=";
94    var ca = document.cookie.split(';');
95    for(var i=0;i < ca.length;i++) {
96        var c = ca[i];
97        while (c.charAt(0)==' ') c = c.substring(1,c.length);
98        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
99    }
100    return null;
101}
102
103/* usunięcie ciasteczka */
104function eraseCookie(name) {
105    createCookie(name,"",-1);
106}
107
108//zamknięcie okienka na kliknięcie w tło i usunięcie obiektów
109function removeCloud(){
110	$(".bgCover , .ajaxCover").fadeOut(function(){ 
111		$(this).remove();
112		idBg=idCloud=null;
113	});
114}
115var btnScrollTop = {
116		init: function()
117		{
118				$('body').append('<div class="btnScroll" onclick="$(\'html, body\').animate({ scrollTop: 0 }, 600);"><i class="fa fa-arrow-up" aria-hidden="true"></i></div>');
119		},
120		
121		
122	}; 
123// efekt zaznaczający objekt
124function bound(obj){
125	var id=randomString(10);
126	wi=obj.outerWidth();
127	he=obj.outerHeight();
128	po=obj.offset();
129	ra=3;
130
131	$("body").append('<div id="'+id+'" class="bound"></div>');
132	$("#"+id).css("width",wi);
133	$("#"+id).css("height",he);
134	$("#"+id).css("border-radius",3);
135	$("#"+id).css("top",po.top);
136	$("#"+id).css("left",po.left);
137	setTimeout(function(){ $("#"+id).remove(); },300);
138}
139
140function getSearch(str){
141	//if (str!="") location.href="szukaj-"+str;
142	if (str!="") location.href="./?search="+str;
143}
144
145function getPercent(l,max){
146	t=l*100/max;
147	if (t>99) t=100;
148	return t.toFixed(2);
149}
150
151function openPdf(s){
152	var h=$(window).height()-($(window).height()*0.2);
153	var _s='<div id="ins" style="margin-top: -'+(h/2)+'px;"><iframe src="http://docs.google.com/gview?url=http://dev.znamlek.pl/media/i/acard_ulotka.pdf&embedded=true"  style="width:800px; height:'+h+'px;" frameborder="0"></iframe></div>';
154	$("body").append('<div id="insBg"></div>');
155	$("body").append(_s);
156}
157
158$(document).ready(function(){
159	$(document).on("click",".bgCover , .closeCloud , .closeButton",function(){
160		removeCloud();
161	});
162	$(document).keyup(function(e) {
163		if (e.keyCode==27) removeCloud();
164	});
165	/*
166	$(document).mouseleave(function(){
167		if (!readCookie('poradnik')){
168			createCookie('poradnik',1,1);
169			runAjaxBox("ajax/ajax_poradnik.php",'ajaxPoradnik');
170		}
171	});
172	*/
173	
174	$(".search #search").keyup(function(e){
175		if (e.keyCode==13){
176			getSearch($(this).val());
177		}
178	});
179	$(".search input[type=button]").click(function(){
180		
181		//console.log( $(this).parent().find('input[type=text]').val() );
182		
183		getSearch($(this).parent().find('input[type=text]').val());
184	});
185
186	// wciskanie graficznych checkbox'ów
187	$(document).on('click','span i.fa.fa-square-o:not(.noRun) , span i.fa.fa-check-square-o:not(.noRun)',function(){
188		var ob=$(this).parent("span").find("input");
189		if (!ob.prop("checked")){
190			ob.prop("checked",true);
191			$(this).removeClass("fa-square-o");
192			$(this).addClass("fa-check-square-o");
193		} else {
194			ob.prop("checked",false);
195			$(this).addClass("fa-square-o");
196			$(this).removeClass("fa-check-square-o");
197		}
198		if (typeof gUrl != 'undefined') {
199			setUrlParam();
200			setTag(tag);
201		}
202	});
203
204	setTimeout(function(){
205		$(".vad").each(function(index){
206			if ($(this).find("img").length > 0){
207				$(this).append('<div class="label">Advertisement</div>');
208			}
209		});
210	},3000);
211
212});
213

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.