PageSourceSearch

https://www.spam.com/wp-content/themes/spam-theme/inc/assets/js/custom/myloadmore.js?ver=6.5.2

js spam.com collected 2026-09-24 09:11:21 UTC 3,684 bytes, 118 lines download raw bytes

1jQuery(function($){ // use jQuery code inside this to avoid "$ is not defined" error
2	
3	var data_page = $('.misha_loadmore').data('page');
4
5	var category = !$('.misha_loadmore').data('category')
6	? ''
7	: $('.misha_loadmore').data('category');
8
9	var recipes_search = !$('.misha_loadmore').data('recipes_search') 
10	? '' 
11	: $('.misha_loadmore').data('recipes_search');
12	
13	$('.misha_loadmore').click(function(){
14
15
16
17		var button = $(this),
18		    data = {
19			'action': 'load_more_recipes',
20			'page' : data_page,
21			'recipes_search' : recipes_search,
22			'category': category
23		};
24 
25		$.ajax({ // you can also use $.post here
26			url : '/wp-admin/admin-ajax.php', // AJAX handler
27			data : data,
28			type : 'POST',
29			beforeSend : function ( xhr ) {
30				button.text('LOAD MORE RECIPES'); // change the button text, you can also add a preloader image
31			},
32			success : function( data ){
33//				var data_page = $('.misha_loadmore').data('page');
34				$('.misha_loadmore').data('page', data_page + 1);
35				data_page++
36
37
38				for (value in data){
39					reviewsCountText = data[value].reviews == '1' ? 'Review' : 'Reviews' ; 
40					stars = PowerReviewsCustom.printStarsCategorySnippet(data[value].rating);
41
42					jQuery('.recipes-ajax').append(
43						"					<div class=\"col-6 col-md-4\">\n" + 
44						"						<article id=\"post-" + data[value].id + "\">\n" + 
45						"						<a href=\"" + data[value].link + "\">\n" + 
46						"							<div class=\"card\">\n" + 
47						"								<img class=\"img-fluid\" src=\"" + data[value].image + "\" alt=\"" + data[value].title + "\" width=\"auto\" height=\"auto\" />\n" + 
48						"							<div class=\"card-body\">\n" + 
49						"								<p class=\"card-text\">" + data[value].title + "</p>\n" + 
50						"								<div class=\"product-reviews\">\n" + 
51						"									<div class=\"pr-stars-snippet justify-content-start\" data-reviews=\"" + data[value].reviews + "\" data-page-id=\"" + data[value].page_id + "\">\n" + 
52						"									<div class=\"pr-rating-stars\" data-rating=\"" + data[value].rating + "\">\n" + 
53						"										" + stars + "\n" + 
54						"									</div>\n" + 
55						"									<div class=\"pr-total-reviews\">" + data[value].reviews + " " + reviewsCountText + "</div></div>                    \n" + 
56						"								</div>\n" + 
57						"							</div>\n" + 
58						"							</div>\n" + 
59						"						</a>\n" + 
60						"						</article><!-- #post-## -->\n" + 
61						"					</div>\n"
62					);			
63
64				}
65				
66				if(data.length == 0) {
67					$('.misha_loadmore').remove()
68				}
69				else {
70					queryData = {
71						'action': 'load_more_recipes',
72						'page' : data_page + 1,
73						'recipes_search' : recipes_search,
74						'category': category
75					}
76					$.ajax({ // you can also use $.post here
77						url : '/wp-admin/admin-ajax.php', // AJAX handler
78						data : queryData,
79						type : 'POST',
80						success : function( data ){
81							if(data.length == 0) {
82								$('.misha_loadmore').remove()
83							}
84						}
85					})
86				}
87			}
88		});
89	});
90	
91	
92	var queryData = {
93		'action': 'load_more_recipes',
94		'page' : 2,
95		'recipes_search' : recipes_search,
96		'category': category
97	}
98	$.ajax({ // you can also use $.post here
99		url : '/wp-admin/admin-ajax.php', // AJAX handler
100		data : queryData,
101		type : 'POST',
102		success : function( data ){
103			if(data.length == 0) {
104				$('.misha_loadmore').remove()
105			}
106		}
107	})
108
109});
110
111jQuery(document).ready(function(){
112	jQuery("#accordion").on(".btn.btn-link.collapsed", function(){
113		jQuery(".collapse").html('<span class="glyphicon glyphicon-collapse-down">Open</span>');
114	});
115	jQuery("#accordion").on(".btn.btn-link", function(){
116		jQuery(".collapse").html('<span class="glyphicon glyphicon-collapse-up">Close</span> ');
117	});
118});

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.