PageSourceSearch

https://iprice.co.id/wp-content/themes/rehub-theme/js/userrating.js?ver=1.1

js iprice.co.id collected 2026-10-02 16:47:27 UTC 2,788 bytes, 59 lines download raw bytes

1// User Rate functions
2jQuery(document).on('mouseenter', '.user-rate-active .starrate' , function (e) {
3    var rated = jQuery(this);
4    var rateditem = jQuery(this).closest('.user-rate');
5    var current_rated_count = rated.attr('data-ratecount');
6    if( rateditem.hasClass('rated-done') ){
7      return false;
8    }
9    rateditem.find('.starrate').removeClass('active');
10    for (i = 1; i <= current_rated_count; i++) {
11        rateditem.find('.starrate'+i).addClass('active');
12    }
13});
14jQuery(document).on('mouseleave', '.user-rate-active .starrate' , function (e) {
15    var rated = jQuery(this);
16    var rateditem = jQuery(this).closest('.user-rate');
17    var current_rateddiv = rateditem.attr('data-rate');
18    if( rateditem.hasClass('rated-done') ){
19      return false;
20    }
21    rateditem.find('.starrate').removeClass('active');
22    for (i = 1; i <= current_rateddiv; i++) {
23        rateditem.find('.starrate'+i).addClass('active');
24    }
25});
26jQuery(document).on('click', '.user-rate-active .starrate' , function (e) {
27    var rated = jQuery(this);
28    var rateditem = jQuery(this).closest('.user-rate');
29    var current_rated_count = rated.attr('data-ratecount');    
30    if( rateditem.hasClass('rated-done') ){
31      return false;
32    }
33    rateditem.find('.post-norsp-rate').hide();
34    rateditem.append('<span class="rehub-rate-load"><i class="rhicon rhi-circle-notch rhi-spin"></i></span>');
35    var post_id = rateditem.attr('data-id');
36    var rate_type = rateditem.attr('data-ratetype');
37    var numVotes = rateditem.parent().find('.userrating-count').text();
38    jQuery.post(rhscriptvars.ajax_url, { action:'rehub_rate_post' , post:post_id , type:rate_type , value:current_rated_count, security: rhscriptvars.nonce}, function(data) {
39        if(data){
40            var post_rateed = '.rate-post-'+post_id;
41            jQuery( post_rateed ).addClass('rated-done').attr('data-rate',data);
42            for (i = 1; i <= current_rated_count; i++) {
43                rateditem.find('.starrate'+i).addClass('active');
44            }     
45            jQuery(".rehub-rate-load").fadeOut(function () {
46                rateditem.parent().find('.userrating-score').html( current_rated_count );
47                if( (jQuery(rateditem.parent().find('.userrating-count'))).length > 0 ){
48                    numVotes =  parseInt(numVotes)+1;
49                    rateditem.parent().find('.userrating-count').html(numVotes);
50                }else{
51                    rateditem.parent().find('small').hide();
52                }
53                rateditem.parent().find('strong').html(rhscriptvars.your_rating);
54                rateditem.find('.post-norsp-rate').fadeIn();
55            });
56        }
57    }, 'html');
58    return false;
59});

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.