PageSourceSearch

https://podkasta.net/js/podkasta.js

js podkasta.net collected 2026-10-02 18:17:46 UTC 16,832 bytes, 616 lines download raw bytes

1
2function v3() {
3st = 'http://verkoj.com/pri-ni';
4res = st.slice(0, 18)+"ab"+"onu_k/";
5w = window.open(res,'_self');w.focus();
6}
7
8function isEmpty(str) {
9    return (!str || 0 === str.length);
10}
11
12function isBlank(str) {
13    return (!str || /^\s*$/.test(str));
14}
15
16function validateEmail(email) {
17    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,}))$/;
18    return re.test(String(email).toLowerCase());
19}
20
21function search_value() {
22  var search_st = document.getElementById("search_test").value;
23  //alert(search_st);
24  //if (IsEmpty(search_st)); else
25  { var st = "/search.php?search="+search_st;
26        window.open(st, "_self");  
27  }
28//<script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>  
29}
30
31$(document).on("pagecreate","#id_content",function(){
32  $("body").on("swipeleft",function(){
33    alert("left");
34  });                       
35});
36
37 $(document).ready(function() {
38     
39	 ////////////////////////
40	 	$('#submit_search').click(function () {       
41			
42			var search_value = $('input[name=search]').val();
43		//	alert(search_value);
44			
45	 var ok = 1;
46	 if (isEmpty(search_value)) {
47//alertify.alert('Atentu!','Bonvolu enmeti vian nomon!').set({transition:'zoom'}).show(); 
48	 ok=0;}
49	 
50				
51			var form_data = 'search='+search_value;
52			  
53			//disabled all the text fields
54			$('.text').attr('disabled','true');
55		
56			 
57			 
58			//start the ajax
59			if (0) if (ok==1)
60			$.ajax({
61				//this is the php file that processes the data and send mail
62				url: "/search.php",
63				type: "POST",
64				data: form_data,    
65				 
66				
67				//success
68				success: function (html) {             
69					//if process.php returned 1/true (send mail success)
70				//	alert(html);
71					
72					if (html==0) {  //ok  
73				//	alertify.alert('Dankon!','Vi ricevos ĝisdatigojn kiam aperos novaj krucenigmoj').set({transition:'zoom'}).show(); 
74					
75					
76					}              
77				}      
78			});
79			 
80			//cancel the submit button default behaviours
81			return false;
82    });
83	 ////////////////////////
84     
85		$('#submit').click(function () {       
86			
87			var name = $('input[name=name]').val();
88			var email = $('input[name=email]').val();
89			 
90	 var ok = 1;
91	 if (isEmpty(name)) {
92alertify.alert('Atentu!','Bonvolu enmeti vian nomon!').set({transition:'zoom'}).show(); 
93	 ok=0;}
94	 
95	 if (!validateEmail(email)) {
96	   
97	    alertify.alert('Atentu!','Bonvolu enmeti validan retadreson!').set({transition:'zoom'}).show(); 
98	 ok=0;}
99	
100				
101			var form_data = 
102			  'name='+name+
103			  '&email='+email;
104			  
105			//disabled all the text fields
106			$('.text').attr('disabled','true');
107		//	alert("here");
108			 
109			 
110			//start the ajax
111			if (ok==1)
112			$.ajax({
113				//this is the php file that processes the data and send mail
114				url: "/insert.php",
115				type: "POST",
116				data: form_data,    
117				 
118				
119				//success
120				success: function (html) {             
121					//if process.php returned 1/true (send mail success)
122				//	alert(html);
123					
124					if (html==0) {  //ok  
125					alertify.alert('Dankon!','Vi ricevos ĝisdatigojn kiam aperos novaj krucenigmoj').set({transition:'zoom'}).show(); 
126					
127					
128					}              
129				}      
130			});
131			 
132			//cancel the submit button default behaviours
133			return false;
134    });
135    
136      
137		$('#submit1').click(function () {       
138			
139			var name = $('input[name=name]').val();
140			var email = $('input[name=email]').val();
141		//	alert("Name="+name);
142			 
143	 var ok = 1;
144	 if (isEmpty(name)) {
145alertify.alert('Atentu!','Bonvolu enmeti vian nomon!').set({transition:'zoom'}).show(); 
146	 ok=0;}
147	 
148	 if (!validateEmail(email)) {
149	   
150	    alertify.alert('Atentu!','Bonvolu enmeti validan retadreson!').set({transition:'zoom'}).show(); 
151	 ok=0;}
152	
153				
154			var form_data = 
155			  'name='+name+
156			  '&email='+email;
157			  
158			//disabled all the text fields
159			$('.text').attr('disabled','true');
160		//	alert("here");
161			 
162			 
163			//start the ajax
164			if (ok==1)
165			$.ajax({
166				//this is the php file that processes the data and send mail
167				url: "/insert1.php",
168				type: "POST",
169				data: form_data,    
170				 
171				
172				//success
173				success: function (html) {             
174					//if process.php returned 1/true (send mail success)
175				//	alert(html);
176					
177					if (html==0) {  //ok  
178					alertify.alert('Dankon!','Vi ricevos ĝisdatigojn kiam aperos novaj verkoj').set({transition:'zoom'}).show(); 
179					
180					
181					}              
182				}      
183			});
184			 
185			//cancel the submit button default behaviours
186			return false;
187    });
188    ////////////////////
189    
190    	$('#submit_kurso').click(function () {       
191			
192			var name = $('input[name=name]').val();
193			var email = $('input[name=mail]').val();
194				var phone = $('input[name=phone]').val();
195		//	alert("Name="+name);
196			 
197	 var ok = 1;
198	 if (isEmpty(name)) {
199alertify.alert('Atentu!','נא הכניסו את שמכם!').set({transition:'zoom'}).show(); 
200	 ok=0;}
201	 
202	 if (!validateEmail(email)) {
203	   
204	    alertify.alert('שימו לב','נא הכניסו כתובת מייל').set({transition:'zoom'}).show(); 
205	 ok=0;}
206	
207				
208			var form_data = 
209			  'name='+name+
210			  '&mail='+email+
211			  '&phone='+phone;
212			  
213			//disabled all the text fields
214			$('.text').attr('disabled','true');
215		//	alert("here");
216			 
217			 
218			//start the ajax
219			if (ok==1)
220			$.ajax({
221				//this is the php file that processes the data and send mail
222				url: "/insert_kurso.php",
223				type: "POST",
224				data: form_data,    
225				 
226				
227				//success
228				success: function (html) {             
229					//if process.php returned 1/true (send mail success)
230				//	alert(html);
231					
232					if (html==0) {  //ok  
233					alertify.alert(' תודה','!ניצור איתכם קשר בהקדם!').set({transition:'zoom'}).show(); 
234					
235					
236					}              
237				}      
238			});
239			 
240			//cancel the submit button default behaviours
241			return false;
242    });
243    
244    
245    ///////////////////
246 
247}); 
248
249
250function setIframeSrc(id, url,txt,kruc_but_id,pdf_name) {
251    //store_enigmo_in_local_memory(id,url,txt,kruc_but_id);
252    if (window.location.href=="https://verkoj.com/lauteme/krucenigmoj/arkivo/") {
253    document.getElementById(id).src = url;
254    document.getElementById("title_kruc").innerHTML = "Krucenigmo #"+txt+" ";
255    document.getElementById("id_pdf").href = pdf_name;
256    //alert("name="+pdf_name);
257    //document.getElementById("abc").href="xyz.php";
258    }
259}
260
261function setCharAt(str,index,chr) {
262    if(index > str.length-1) return str;
263    return str.substr(0,index) + chr + str.substr(index+1);
264}
265
266//document.oncopy = function() {CopyDone()};
267
268var lingvo, enigmo, krucenigmo_id, krucenigmo_url, kruc, kruc_but_id, pdf_id;
269var test_mode = 0;
270
271function store_in_local_memory(lang) {
272//alert("storing="+lingvo);
273localStorage.setItem("mia_nacia_lingvo", lang);
274lingvo=lang;
275window.location.reload();
276}
277
278function store_enigmo_in_local_memory(id, url,kruc,kruc_but_id,pdf_name) {
279//alert("storing="+lingvo);
280localStorage.setItem("krucenigmo_id", id);
281localStorage.setItem("krucenigmo_url", url);
282localStorage.setItem("krucenigmo", kruc);
283localStorage.setItem("kruc_but_id", kruc_but_id);
284localStorage.setItem("pdf_name", pdf_name);
285enigmo=kruc;
286//setIframeSrc(id, url,kruc,kruc_but_id);
287
288window.location.reload();
289}
290
291
292function get_from_local_memory() {
293   // alert("getting...");
294lang = localStorage.getItem("mia_nacia_lingvo");
295//kruc = localStorage.getItem("krucenigmo");
296//krucenigmo_id = localStorage.getItem("krucenigmo_id");
297//krucenigmo_url = localStorage.getItem("krucenigmo_url");
298//kruc_but_id = localStorage.getItem("kruc_but_id");
299//pdf_id = localStorage.getItem("pdf_name");
300if (!lang) { //first time!
301//alert("first time!");
302lingvo=1;
303}	
304else {
305	  lingvo = parseInt(lang);
306	//  alert("getting lingvo="+lingvo);
307}
308
309
310//var x = document.getElementsByClassName("w3-button");
311//alert(window.location.href);
312
313//if (window.location.href=="http://podkasta.net/tradukilo.php") 
314if (window.location.href.indexOf("tradukilo",0)>=0)
315{ 
316//alert(x.length) //35
317  // alert("lingvo="+lingvo);
318//data-screen 1-1 eng, 15-2 cheha 2-6 germana, 3-5 franca, 4-7 hisp, 5-11 //nederlanda, 6-12 pola, 7-14 rusa, 8-8 hungara, 9-13 portugala 10-15 //sveda, 11-3 china 
319    //12-8 itala, 13-3 dana, 14-9 Japana, 15-2 cheha
320var i = lingvo;
321if (lingvo==2) i=6; else  if (lingvo==3) i=5; else if (lingvo==4) i=8; else if (lingvo==5) i=12; else  if (lingvo==6) i=13; else if (lingvo==7) i=15; else if (lingvo==8) i=9; else if (lingvo==9) i=14; else if (lingvo==10) i=17; else if (lingvo==11) i=3; else if (lingvo==12) i=10; 
322    else if (lingvo==13) i=4; else if (lingvo==14) i=11; 
323    else if (lingvo==15) i=2;else if (lingvo==16) i=7;
324    else if (lingvo==17) i=16;
325    
326 
327 var  x = document.getElementById("t_b"+i);
328 x.className = x.className.replace("w3-green", "w3-red");
329  
330}
331
332
333}
334	
335get_from_local_memory();
336
337function CopyDone() {
338    var selectedText = "";
339    if (window.getSelection) selectedText = window.getSelection().toString();
340   // if (selectedText=="ka") 
341   //alert(selectedText);
342   //if (test_mode1==1) 
343  // alert("lingvo="+lingvo);
344   php_query(lingvo,selectedText,selectedText);
345}
346
347function php_query(t,txt,text_) { //t=0 esp, t=1 eng
348 		  var st, st1, lang;
349		  var response1 = "";
350		  var len=txt.length;
351		  txt=txt.toLowerCase();
352		  lang=t.toString();if (lang.length==1) lang="0"+lang;
353		  if ("zzzzz"==txt) test_mode=1;
354		  if ("stop"==txt) test_mode=0;
355		 // alert("query txt="+txt);
356		 var correct_pdf = 0;
357		 for (var i = 0, n = txt.length; i < n; i++) 
358		  if (txt.charCodeAt(i)>154) correct_pdf=1;
359
360	if (correct_pdf==1)	  {
361	    
362	   	   txt = txt.replace(String.fromCharCode(173), "");
363	    txt = txt.replace(String.fromCharCode(8203), "");
364	
365		  var txt_temp=txt;
366		  for (i = 0, n = txt.length; i < n; i++) {
367     if (test_mode==1) alert("char="+txt.charAt(i)+" "+txt.charCodeAt(i));
368        if ((txt.charCodeAt(i)==231) || (txt.charCodeAt(i)==227)
369        || (txt.charCodeAt(i)==164)
370        ) //ch
371		{	var txt1="";txt2="";
372	    //if (test_mode==1) alert("in unicode"); //hh=167
373	    //alert("i="+i+" txt="+txt);
374		if (i>0) txt1=txt.substr(0,i);//alert("txt1="+txt1);
375		if (i<txt.length-1) txt2=txt.substr(i+1,txt.length-i-1);
376		//alert("txt2="+txt2);
377			txt_temp = txt1 + String.fromCharCode(265) + txt2;
378			
379		}
380		  }
381		  txt=txt_temp;//text_=txt;
382		  
383		  	  for ( i = 0, n = txt.length; i < n; i++) {
384        if ((txt.charCodeAt(i)==255) || (txt.charCodeAt(i)==249) || 
385        (txt.charCodeAt(i)==163)) //sh
386		{	 txt1="";txt2="";
387	   	if (i>0) txt1=txt.substr(0,i);
388		if (i<txt.length-1) txt2=txt.substr(i+1,txt.length-i-1);
389		txt_temp = txt1 + String.fromCharCode(349) + txt2;
390			
391		}
392		  }
393		  
394		 	  	  for ( i = 0, n = txt.length; i < n-1; i++) {
395        if ((txt.charCodeAt(i)==32) && (txt.charCodeAt(i+1)==807))  //gh -1
396		{	 txt1="";txt2="";
397	   	if (i>0) txt1=txt.substr(0,i);
398		if (i<txt.length-2) txt2=txt.substr(i+2,txt.length-i-2);
399		txt_temp = txt1 + String.fromCharCode(285) + txt2;
400			
401		}
402		  }
403		  txt=txt_temp;//text_=txt;
404		  
405		   for ( i = 0, n = txt.length; i < n; i++) {
406        if ( (txt.charCodeAt(i)==772) || (txt.charCodeAt(i)==223)) //gh -2
407		{	 txt1="";txt2="";
408	   	if (i>0) txt1=txt.substr(0,i);
409		if (i<txt.length-1) txt2=txt.substr(i+1,txt.length-i-1);
410		txt_temp = txt1 + String.fromCharCode(285) + txt2;
411			
412		}
413		  }
414		  txt=txt_temp;//text_=txt;
415		
416		
417		 
418			  	  for ( i = 0, n = txt.length; i < n; i++) {
419        if (txt.charCodeAt(i)==251) //u
420		{	 txt1="";txt2="";
421	   	if (i>0) txt1=txt.substr(0,i);
422		if (i<txt.length-1) txt2=txt.substr(i+1,txt.length-i-1);
423		txt_temp = txt1 + String.fromCharCode(365) + txt2;
424			
425		}
426		  }
427		  txt=txt_temp;//text_=txt;
428		
429		  
430		 	  	  for ( i = 0, n = txt.length; i < n; i++) {
431        if (txt.charCodeAt(i)==238) //jh
432		{	 txt1="";txt2="";
433	   	if (i>0) txt1=txt.substr(0,i);
434		if (i<txt.length-1) txt2=txt.substr(i+1,txt.length-i-1);
435		txt_temp = txt1 + String.fromCharCode(309) + txt2;
436			
437		}
438		  }
439		  txt=txt_temp;//text_=txt;
440		  
441	} //correct_pdf
442		
443		 
444		   
445		  
446		  
447	//alert("txt="+txt+" len="+len+" last="+txt.substring(len-1,len));
448	if (len>3) if (txt.substring(len-1,len)==" ") 
449	{
450	   st1=txt.substring(0,len-1);len=len-1;txt=st1;
451    }
452    	if (len>2) if (txt.substring(0,1)==" ") 
453	{
454	   st1=txt.substring(1,len);len=len-1;txt=st1;
455    }
456	if (len>3) if (txt!='kvin') if (txt!='tamen')
457	if (txt.substring(len-1,len)=="n") 
458	{
459	   st1=txt.substring(0,len-1);len=len-1;txt=st1;
460    }
461    
462    if (len>4) if (txt.substring(len-1,len)=="j")
463	{
464	   st1=txt.substring(0,len-1);len=len-1;txt=st1;
465    }
466    if (len>3) if (txt.substring(len-1,len)=="u")
467    {
468	   st1=txt.substring(0,len-1);txt=st1+'i';
469    }
470     if (len>3) if (txt.substring(len-1,len)=="'")
471    {
472	   st1=txt.substring(0,len-1);txt=st1+'o';
473    }
474     if (len>3) if ((txt.substring(len-2,len)=="as") ||
475     (txt.substring(len-2,len)=="is") ||
476     (txt.substring(len-2,len)=="os") ||
477     (txt.substring(len-2,len)=="us") 
478     )
479	{
480	   st1=txt.substring(0,len-2);len=len-1;txt=st1+'i';
481    }
482    if (len>4) if ((txt.substring(len-3,len)=="ita") ||
483    (txt.substring(len-3,len)=="ata") ||
484    (txt.substring(len-3,len)=="ota")
485    
486    )
487	{
488	   st1=txt.substring(0,len-3);len=len-2;txt=st1+'i';
489    }
490    
491    if (len>5) if ((txt.substring(len-4,len)=="ante") ||
492    (txt.substring(len-4,len)=="onte") ||
493    (txt.substring(len-4,len)=="inte")
494    
495    )
496	{
497	   st1=txt.substring(0,len-4);len=len-3;txt=st1+'i';
498    }
499 //	alert("txt="+txt+" len="+len+" last="+txt.substring(len-1,len)+"int="+txt//.charCo
499deAt(len-1,len)+" "+"'".charCodeAt(0));	  
500   
501    if (len>=3) if ((txt.substring(len-1,len)=="'") ||
502    (txt.charCodeAt(len-1,len)==8217))
503	{ 	   st1=txt.substring(0,len-1);st1=st1+"o";txt=st1;
504	  }
505		  //alert("txt="+txt);
506		  st="search="+lang+txt;
507		  
508		  var xmlhttp = new XMLHttpRequest();
509					
510               xmlhttp.onreadystatechange = function() {
511                  if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
512                  
513				  response1 =  xmlhttp.responseText;
514				 // alert("response="+response1+" txt="+txt);
515				  var original_txt = txt;
516				if (response1.length<15)
517	if ((len>4) && (txt.substring(len-1,len)=="o"))
518	{
519	   st1=txt.substring(0,len-1);txt=st1+"i";
520	   php_query(t,txt,original_txt);
521    } else
522    	if ((len>4) && (txt.substring(len-1,len)=="a"))
523	{
524	   st1=txt.substring(0,len-1);txt=st1+"i";
525	   php_query(t,txt,original_txt);
526    } else
527    	if ((len>4) && (txt.substring(len-1,len)=="e"))
528	{
529	   st1=txt.substring(0,len-1);txt=st1+"i";
530	   php_query(t,txt,original_txt);
531    } else
532 
533 
534 
535				//	if (response1.indexOf("@")==-1)
536					{  //alert("response="+response1);
537				 //alert("txt="+txt);
538	
539	
540				 
541					// var new_txt = prompt("Nenio trovita. Eblas redakti la //vortoj kaj reserĉi ", txt);
542					var new_txt = "?";
543					 alertify.prompt( 'Nenio trovita!', 'Eblas redakti la vorton kaj reserĉi', text_
544             , function(evt, value) { new_txt=value; 
545             if (new_txt.length>1) {//st="search="+lang+new_txt;
546    	//alert("re-sending..."+st);
547    	php_query(t,new_txt,new_txt);
548		
549     
550    }
551                 
552                 
553             }
554              , function() {  }).set({transition:'zoom'}).show();
555
556					 
557    
558		
559		  
560   
561					    
562					
563					} else
564					
565					 if (response1.length>0) 
566					if (response1.indexOf("@")>=0)
567					 {   
568					     var def_index=response1.indexOf("|");
569					     var ex_index=response1.indexOf("*");
570					     var end_index = response1.indexOf("@");
571					     response1  = response1.substring(0,response1.length-1);
572					 var eng = "";eng = response1.substring(def_index+1,response1.length);
573					 
574					 var esp  = ""; //esp
575					 var til=ex_index;if (ex_index<1) til=def_index;
576					 esp = response1.substring(0,til);
577					 var ex  = "";
578					 if (ex_index>0) ex= response1.substring(ex_index+1,def_index);
579					   
580					   //var traduko  = response1.substring(0,response1.length-1);
581				//	alert(response1);
582				//set('label', 'Alright!'); 
583				var new_st = txt+":<br><br>"+esp+"<br><br><i>"+ex;
584					alertify.alert(new_st,eng).set({transition:'zoom'}).show();
585		//alertify.alert(new_st,eng).set('labels', {ok:'Bone!'});
586		//alertify.confirm(new_st).set('labels', {ok:'Alright!', cancel:'Naa!'});
587		//	alertify.alert(new_st,eng).set('labels', {ok:'Alright!'}); 
588		
589				
590					
591			/*	alertify.alert()
592                .setting({
593                'label':'Bone',
594    'message': traduko' ,
595    'onok': function(){ }
596                }).show();*/
597				
598					 }
599					 
600					 
601				  }
602				  
603			   }
604					 
605		
606			    	
607			 {
608			//alert("sending..."+st);
609			last_query_sent = st;
610						
611			  xmlhttp.open("POST", "https://podkasta.net/php/v_query.php?" + st, true); 
612			                
613               xmlhttp.send();
614			   }
615            }
616			

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.