PageSourceSearch

https://www.miastokobiet.pl/wp-content/plugins/nextgen-gallery-voting/js/ajaxify-stars.js?ver=6.4.12

js miastokobiet.pl collected 2026-10-02 08:07:14 UTC 2,300 bytes, 69 lines download raw bytes

1function nggv_stars_click(e) {
2	var container = jQuery(this).parents('.nggv_container');
3	
4	container.find('img.nggv-star-loader').show();
5	
6	var url = jQuery(this).attr('href');
7	url += '&ajaxify=1';
8	
9	jQuery.ajax({
10			url: url,
11			data: '',
12			success: function(data, textStatus, XMLHttpRequest) {
13				var ajaxVer = data.indexOf('var nggv_ajax_ver'); //bit of a hack to improve ajax with minification, but keeping backwards compat for older users
14				if(ajaxVer > -1) { //means it was actually found, the ver num is irrelevent for now
15					eval(data);
16				}else{
17					var start = data.indexOf("<!-- NGGV START AJAX RESPONSE -->") + 41; //find the start of the outputting by the ajax url (stupid wordpress and poor buffering options blah blah)
18					var end = data.indexOf("<script><!-- NGGV END AJAX RESPONSE -->");
19					
20					var js = data.substr(start, (end-start));
21					js = js.replace(/(\r\n|\n|\r)/gm,'');
22					
23					eval(js); //the array of voters gets echoed out at the ajax url
24				}
25				
26				if(typeof(nggv_js) == 'object') {
27					var msg = '';
28					if(nggv_js.saved) {
29						jQuery(document).focus();
30						container.find('.nggv-vote-form').html(nggv_js.voting_form);
31					}else{
32						if(nggv_js.msg) {
33							msg = nggv_js.msg
34						}else{ //there should always be a msg, but just in case lets default one
35							msg = jQuery('#ngg-genric-err-msg').val();
36						}
37						
38						//if we got markup back, replace the voting form with it
39						if(nggv_js.voting_form) {
40							jQuery(document).focus();
41							container.find('.nggv-vote-form').html(nggv_js.voting_form);
42						}
43					}
44				}else{
45					msg = jQuery('#ngg-genric-err-msg').val();
46				}
47				
48				if(msg) {
49					//the 'continer' div and 'nggv-error' div are on the same dom level, making them siblings
50					container.find('div.nggv-error').show();
51					container.find('div.nggv-error').html(msg);
52				}
53			},
54			error: function(XMLHttpRequest, textStatus, errorThrown) {
55				container.find('div.nggv-error').show();
56				container.find('div.nggv-error').html(jQuery('#ngg-genric-err-msg').val());
57			},
58			complete: function() {
59				container.find('img.nggv-star-loader').hide();
60			}
61	});
62	
63	e.preventDefault();
64	return false;
65}
66
67jQuery(document).ready(function() {
68		jQuery('ul.star-rating li a').click(nggv_stars_click);
69});

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.