PageSourceSearch

https://lucytheelephant.org/wp-content/themes/maxmuseum/include/postlike/simple-likes-public.js?ver=0.5

js lucytheelephant.org collected 2026-10-02 03:37:00 UTC 1,475 bytes, 56 lines download raw bytes

1(function( $ ) {
2	'use strict';
3
4	$(document).on('click', '.sl-button', function() {
5
6		var button = $(this);
7		var post_id = button.attr('data-post-id');
8		var security = button.attr('data-nonce');
9		var iscomment = button.attr('data-iscomment');
10		var allbuttons;
11
12		if ( iscomment === '1' ) { /* Comments can have same id */
13			allbuttons = $('.sl-comment-button-'+post_id);
14		} else {
15			allbuttons = $('.sl-button-'+post_id);
16		}
17
18		var loader = allbuttons.next('#sl-loader');
19
20		if ( post_id !== '' ) {
21
22			$.ajax({
23				type: 'POST',
24				url: simpleLikes.ajaxurl,
25				data : {
26					action : 'maxmuseum_process_simple_like',
27					post_id : post_id,
28					nonce : security,
29					is_comment : iscomment
30				},
31				beforeSend:function(){
32					loader.html('&nbsp;<div class="loader">Loading...</div>');
33				},
34				success: function(response) {
35					var icon = response.icon;
36					var count = response.count;
37				allbuttons.html(icon+count);
38					if(response.status === 'unliked') {
39						var like_text = simpleLikes.like;
40						allbuttons.prop('title', like_text);
41						allbuttons.removeClass('liked');
42						$(".like-label").removeClass('liked');
43					} else {
44						var unlike_text = simpleLikes.unlike;
45						allbuttons.prop('title', unlike_text);
46						allbuttons.addClass('liked');
47						$(".like-label").addClass('liked');
48					}
49					loader.empty();					
50				}
51			});
52			
53		}
54		return false;
55	});
56})( jQuery );

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.