<commit_before>(function ( $ ) {
	"use strict";

	$(function () {

		// catch the upvote/downvote action
		$( 'div.comment-weight-container' ).on( 'click', 'span > a', function( e ){
			e.preventDefault();
			var value = 0;
			var comment_id = $(this).data('commentId');
			if ( $(this).hasClass( 'vote-up' ) ) {
				value = 1;
			} else if( $(this).hasClass( 'vote-down' ) ) {
				value = -1;
			}

			var post = $.post( comment_popularity.ajaxurl, {action: 'comment_vote_callback', vote: value, comment_id: comment_id, hmn_vote_nonce: comment_popularity.hmn_vote_nonce} );

			post.done( function( data ) {

				if ( data.success === false ) {
					alert( data.data.error_message );
				} else {
					// update karma
					$( '#comment-weight-value-' + data.data.comment_id ).text( data.data.weight );
				}


			});

		});

	});

}(jQuery));<commit_msg>Growl on success<commit_after>(function ( $ ) {
	"use strict";

	$(function () {

		// catch the upvote/downvote action
		$( 'div.comment-weight-container' ).on( 'click', 'span > a', function( e ){
			e.preventDefault();
			var value = 0;
			var comment_id = $(this).data('commentId');
			if ( $(this).hasClass( 'vote-up' ) ) {
				value = 1;
			} else if( $(this).hasClass( 'vote-down' ) ) {
				value = -1;
			}

			var post = $.post( comment_popularity.ajaxurl, {action: 'comment_vote_callback', vote: value, comment_id: comment_id, hmn_vote_nonce: comment_popularity.hmn_vote_nonce} );

			post.done( function( data ) {

				if ( data.success === false ) {
					alert( data.data.error_message );
				} else {
					// update karma
					$( '#comment-weight-value-' + data.data.comment_id ).text( data.data.weight );
					$.growl.notice({ message: data.data.success_message });
				}

			});

		});

	});

}(jQuery));
{'fraction_non_alphanumeric': 0.18668922729836435, 'fraction_numerical': 0.00338409475465313, 'mean_word_length': 3.00451467268623, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1413726', 'n_tokens_mistral': 738, 'n_tokens_neox': 613, 'n_words': 126}