PageSourceSearch

https://ragdollcomics.com/wp-content/plugins/toocheke-companion/js/likes.js?ver=2.29

js ragdollcomics.com collected 2026-10-08 09:15:31 UTC 1,378 bytes, 48 lines download raw bytes

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