PageSourceSearch

https://paparazzi.ru/js/actions.js?rnd=1790920526

js paparazzi.ru collected 2026-10-02 05:56:06 UTC 9,117 bytes, 387 lines download raw bytes

1$(function(){
2	var tmo;
3	
4	$("#recaptcha").click(function(){
5		$.ajax({
6	  		url: '/inc/ajax/ajax_func.php?action=getCaptcha',
7	  		success: function(data) {
8				$("#captcha_sid").val(data);
9				$("#captcha_img").attr('src', '/bitrix/tools/captcha.php?captcha_sid='+data);
10	  		}
11		});
12		return false;
13	});	
14	
15	
16	$(".validateinput").keyup(function(){
17		var propName = $(this).attr("name");
18		var propValue = $(this).val();
19		var validateContainter = $(this).parent();				
20		clearTimeout(tmo);
21		tmo = setTimeout(function(){
22			if (propValue != "") {
23				validateContainter.find(".validate-result").show().html('<img style="vertical-align: middle;" alt="" src="/i/load.gif"> проверка');
24				$.ajax({
25					url: '/inc/ajax/ajax_func.php?action=checkUserProp&propName=' + propName + '&propValue=' + propValue,
26					success: function(data){
27						if(data == "ok"){
28							//validateContainter.find(".validate-result").hide();
29							validateContainter.find(".validate-result").html(data).removeClass("error");	
30						}
31						else{
32							validateContainter.find(".validate-result").html(data).addClass("error");	
33						}
34					}
35				});
36			}
37			else{
38				validateContainter.find(".validate-result").hide();
39			}			
40		}, 500);
41	});
42	
43	
44	
45	$("#PERSONAL_COUNTRY").change(function(){
46		var obj = $(this);
47		var country = $(this).val();
48		$.ajax({
49	  		url: '/inc/ajax/ajax_func.php?action=getStates&country='+country,
50	  		success: function(data) {
51				$("#PERSONAL_STATE").html(data);
52				$("#PERSONAL_CITY").html('<option value="0">Любой</option>');
53	  		}
54		});
55	});
56	
57	
58	$("#PERSONAL_STATE").change(function(){
59		var obj = $(this);
60		var state = $(this).val();
61		$.ajax({
62	  		url: '/inc/ajax/ajax_func.php?action=getCities&state='+state,
63	  		success: function(data) {
64				$("#PERSONAL_CITY").html(data);
65	  		}
66		});
67	});
68	
69	
70	$(".add-friend").click(function(){
71		var userID = $(this).attr("rel");
72		var cont = $(this);
73		$.ajax({
74				url: '/inc/ajax/ajax_func.php?action=addUserToFriend&id=' + userID,
75				success: function(data){
76					cont.html(data);
77				}
78			});		
79	});
80	
81	
82	$(".rating-up").click(function(){
83		//alert("up");
84		var id = $(this).attr("elid");
85		var target = $(this).attr("rel");
86		if (id > 0 && target != "") {
87			$.ajax({
88				type: "POST",
89				url: "/inc/ajax/ajax_func.php",
90				data: "action=ratingUp&target=" + target + "&id=" + id,
91				success: function(data){
92					$("#" + target + "-plusminus-" + id).html("");
93					$("#" + target + "-rating-" + id).html(data);
94				}
95			});
96		}
97		return false;
98	});
99	
100	
101	$(".rating-down").click(function(){
102		var id = $(this).attr("elid");
103		var target = $(this).attr("rel");		
104		if (id > 0 && target != "") {
105			$.ajax({
106				type: "POST",
107				url: "/inc/ajax/ajax_func.php",
108				data: "action=ratingDown&target=" + target + "&id=" + id,
109				success: function(data){
110					$("#" + target + "-plusminus-" + id).html("");
111					$("#" + target + "-rating-" + id).html(data);
112				}
113			});
114		}
115		return false;
116	});
117	
118	
119	$(".msg form").submit(function(){
120		if($(this).attr("id") == "message-form"){
121			return true;
122		}
123		var frmRes = $(this).serialize();
124		var forChange = $(this).parents(".msg").get(0);
125		var formElements = this.getElementsByTagName("textarea");
126		for(var i=0, element; element=formElements[i]; ++i){
127			if("value" in element){
128				if(element.value == ""){
129					return false;
130				}
131			}
132		}
133		$.ajax({
134		   type: "POST",
135		   url: "/inc/ajax/ajax_func.php",
136		   data: frmRes,
137		   success: function(msg){
138		     $(forChange).replaceWith(msg);
139		   }
140		 });
141		return false;
142	});
143	
144	
145	$("#delete-messages").click(function(){
146		$(".thread-mark:checked").each(function(){
147			var msg = $(this).parents(".msg").get(0);
148			var thread_id = $(this).val();
149			$.ajax({
150				type: "POST",
151				url: "/inc/ajax/ajax_func.php",
152				data: "action=deleteThread&id="+thread_id,
153				success: function(data){
154					//alert(data);
155					$(msg).hide();
156				}
157			});
158		});
159		
160		$(".mess-mark:checked").each(function(){
161			var msg = $(this).parents(".msg").get(0);
162			var id = $(this).val();
163			$.ajax({
164				type: "POST",
165				url: "/inc/ajax/ajax_func.php",
166				data: "action=deleteMessage&id="+id,
167				success: function(data){
168					//alert(data);
169					$(msg).hide();
170				}
171			});
172		});		
173		return false;
174	});
175	
176	$("#mark-unread").click(function(){
177		$(".thread-mark:checked").each(function(){
178			var msg = $(this).parents(".msg").get(0);
179			var id = $(this).val();
180			$.ajax({
181				type: "POST",
182				url: "/inc/ajax/ajax_func.php",
183				data: "action=markAsUnread&target=thread&id="+id,
184				success: function(data){
185					$(msg).addClass("msg-unread");
186				}
187			});
188		});		
189		
190		$(".mess-mark:checked").each(function(){
191			var msg = $(this).parents(".msg").get(0);
192			var id = $(this).val();
193			$.ajax({
194				type: "POST",
195				url: "/inc/ajax/ajax_func.php",
196				data: "action=markAsUnread&target=message&id="+id,
197				success: function(data){
198					$(msg).addClass("msg-unread");
199				}
200			});
201		});			
202		return false;		
203	});
204	
205	$("#mark-spam").click(function(){
206		$(".thread-mark:checked").each(function(){
207			var msg = $(this).parents(".msg").get(0);
208			var id = $(this).val();
209			$.ajax({
210				type: "POST",
211				url: "/inc/ajax/ajax_func.php",
212				data: "action=markAsSpam&target=thread&id="+id,
213				success: function(data){
214					$(msg).hide();
215				}
216			});
217		});		
218		
219		$(".mess-mark:checked").each(function(){
220			var msg = $(this).parents(".msg").get(0);
221			var id = $(this).val();
222			$.ajax({
223				type: "POST",
224				url: "/inc/ajax/ajax_func.php",
225				data: "action=markAsSpam&target=message&id="+id,
226				success: function(data){
227					$(msg).hide();
228				}
229			});
230		});			
231		return false;		
232	});	
233});
234
235function onUploadComplete(resp){
236	//alert(resp);
237	$("#add_video_button").removeClass("red-button-gray");
238	$("#add_video_button").removeAttr("disabled");	
239	$("#poster_picture").html(resp);
240}
241
242function onUploadProgress(progress){
243	//alert(progress);
244	if(!document.getElementById("progress_bar")){
245		$("#upload_progress").html("<div id='progress_bar'>&nbsp;</div>");
246	}
247	$("#progress_bar").width(progress+"%");
248	$("#temp_data").html("Загрузка..."+progress+"%");
249}
250
251function onUploaderCheck(){
252	return true;
253}
254
255
256function onUploadStart(){
257	//alert("start");
258	$("#add_video_button").addClass("red-button-gray");
259	$("#add_video_button").attr("disabled", "disabled");
260}
261
262
263function getPhoto(id){
264	$.ajax({
265		type: "POST",
266		url: "/inc/ajax/ajax_func.php",
267		data: "action=getPhoto&id="+id,
268		success: function(data){
269			$("#element").html(data);
270		}
271	});
272}
273
274
275function replacePhoto(resp){
276	var re = /id([0-9]+)/i;
277	var found = resp.match(re);
278	resp.replace(found, '');
279	$("#img-holder-"+found[1]).html(resp);
280	//alert(found[1]);
281}
282
283
284function clearPhoto(fid){
285	$.ajax({
286		type: "POST",
287		url: "/inc/ajax/ajax_func.php",
288		data: "action=clearPic&fid="+fid,
289		success: function(data){
290			$("#poster_picture").html(data);
291		}
292	});
293}
294
295
296function confdel(text){
297	if (confirm(text)) {
298		return true;
299	} else {
300		return false;
301	}
302}
303
304
305function hover(id){
306	var obj = document.getElementsByName('pic');
307	for(i=0;i<obj.length;i++){
308		$('#'+obj[i].id).removeClass('cs-pict-selected');
309	}
310	$('#'+id).toggleClass('cs-pict-selected');
311}
312
313
314function ShowButton(){
315	var inputs = document.getElementsByTagName('input');
316	var k = 0;
317	for(var i=0; i<inputs.length; i++){
318		if(inputs[i].getAttribute('type')=='checkbox' && inputs[i].checked==true){
319			k++;
320		}
321	}
322	if(k>0){
323		$('#button').css('display', 'inline');
324		if(k==1){
325			$('#button').html('<font color="red">Удалить альбом</font>');
326		}else{
327			$('#button').html('<font color="red">Удалить альбомы</font>');
328		}
329	}else{
330		$('#button').css('display', 'none');
331	}
332}
333
334
335function ShowButtonVideo(){
336	var inputs = document.getElementsByTagName('input');
337	var k = 0;
338	for(var i=0; i<inputs.length; i++){
339		if(inputs[i].getAttribute('type')=='checkbox' && inputs[i].checked==true){
340			k++;
341		}
342	}
343	if(k>0){
344		$('#button').css('display', 'inline');
345	}else{
346		$('#button').css('display', 'none');
347	}
348}
349
350
351function DropArea(i) {
352	if(i==1){
353		if(document.all.getlink_post2.style.display == 'none'){
354			$('#getlink_post1').toggle();
355			$('#text1').select();
356		}else{
357			$('#getlink_post1').toggle();
358			$('#text1').select();
359			$('#getlink_post2').toggle();
360		}
361	}
362	if(i==2){
363		if(document.all.getlink_post1.style.display == 'none'){
364			$('#getlink_post2').toggle();
365			$('#text2').select();
366		}else{
367			$('#getlink_post2').toggle();
368			$('#text2').select();
369			$('#getlink_post1').toggle();
370		}
371	}
372	return false;
373}
374function delete_comments(id)
375{
376	$.ajax({
377		type: "POST",
378		url: "/inc/ajax/ajax_func.php",
379		data: "action=del_comment&element_id="+id,
380		success: function(data){
381			//alert(data);
382			$(msg).hide();
383		}
384	});
385}
386
387

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.