PageSourceSearch

https://dejavu-fonts.org/wp-content/themes/rehub-theme/js/wishcount.js?ver=1.1

js dejavu-fonts.org collected 2026-10-02 03:09:46 UTC 5,083 bytes, 103 lines download raw bytes

1jQuery(document).ready(function($) {
2   'use strict';
3    //wishlist function
4    $(document).on("click", ".heart_thumb_wrap .heartplus", function(e){
5        e.preventDefault();
6        var $this = $(this);
7        if ($this.hasClass("restrict_for_guests")) {
8            return false;
9        }      
10        var post_id = $(this).data("post_id");  
11        var informer = parseInt($(this).attr("data-informer"));      
12        $(this).addClass("loading");
13        if($this.hasClass('alreadywish')){
14            var wishlink = $this.data("wishlink");
15            if (typeof $this.data("wishlink") !== "undefined" && $this.data("wishlink") !='' && $('.re-favorites-posts').length == 0) {
16                window.location.href= $this.data("wishlink");
17                return false;
18            }
19            var actionwishlist = 'remove';
20        }else{
21            var actionwishlist = 'add';
22        }
23
24        $.ajax({
25            type: "post",
26            url: rhscriptvars.ajax_url,
27            data: "action=rhwishlist&wishnonce="+rhscriptvars.wishnonce+"&wish_count="+actionwishlist+"&post_id="+post_id
28        }).done(
29            function(count){
30                $this.removeClass("loading"); 
31
32                if($this.hasClass('alreadywish')){
33                    $this.removeClass('alreadywish');      
34                    informer=informer-1;
35                    $this.closest('.heart_thumb_wrap').find('#wishcount' + post_id + '').text(informer);
36                    if($('.rh-wishlistmenu-link .rh-icon-notice').length){
37                        var overallcount = parseInt($('.rh-wishlistmenu-link .rh-icon-notice').html());
38                        $('.rh-wishlistmenu-link .rh-icon-notice').text(overallcount - 1);
39                    }
40                    $this.attr("data-informer",informer);
41                    if($('#wishremoved' + post_id + '').length > 0){
42                       $.simplyToast($('#wishremoved' + post_id + '').html(), 'danger');
43                    } 
44                }else{
45                    $this.addClass('alreadywish');      
46                    informer=informer+1;
47                    $this.closest('.heart_thumb_wrap').find('#wishcount' + post_id + '').text(informer);
48                    if($('.rh-wishlistmenu-link .rh-icon-notice').length){
49                        if($('.rh-wishlistmenu-link .rh-icon-notice').hasClass('rhhidden')){
50                            $('.rh-wishlistmenu-link .rh-icon-notice').removeClass('rhhidden');
51                            $('.rh-wishlistmenu-link .rh-icon-notice').text(1);
52                        }else{
53                            var overallcount = parseInt($('.rh-wishlistmenu-link .rh-icon-notice').html());
54                            $('.rh-wishlistmenu-link .rh-icon-notice').text(overallcount + 1);
55                        }
56                    }
57                    $this.attr("data-informer",informer); 
58                    if($('#wishadded' + post_id + '').length > 0){
59                       $.simplyToast($('#wishadded' + post_id + '').html(), 'success');
60                    } 
61                }                     
62            }
63        );
64        return false;
65    }); 
66
67    //Wishlist fallback for cached sites
68    if(typeof wishcached !== 'undefined'){
69        var favListed = $(".heartplus");
70        if(favListed.length !=0){
71            $.ajax({
72                type: "get",
73                url: wishcached.rh_ajax_url,
74                data: "action=refreshwishes&userid="+wishcached.userid,
75                cache:!1
76            }).done(
77                function(data){
78                    var wishlistids = data.wishlistids.split(',');
79                    if(wishlistids.length !=0){
80                        favListed.each(function(){
81                            var postID = $(this).attr("data-post_id");
82                            if($.inArray(postID, wishlistids) !=-1 ){
83                                if($(this).hasClass('alreadywish') == false){
84                                    $(this).addClass('alreadywish'); 
85                                    var informer = parseInt($(this).attr("data-informer"));
86                                    informer=informer+1;
87                                    $(this).attr("data-informer", informer); 
88                                    $(this).closest('.heart_thumb_wrap').find('#wishcount' + postID + '').text(informer);
89                                }
90                            }
91                        });
92                        if($('.rh-wishlistmenu-link .rh-icon-notice').length){
93                            if($('.rh-wishlistmenu-link .rh-icon-notice').hasClass('rhhidden')){
94                                $('.rh-wishlistmenu-link .rh-icon-notice').removeClass('rhhidden');
95                            }
96                            $('.rh-wishlistmenu-link .rh-icon-notice').text(data.wishcounter);
97                        }
98                    }
99                }
100            );
101        }
102    }   
103}); 

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.