PageSourceSearch

https://arzdigital.com/wp-content/themes/arz-theme/assets/js/coins/coins-favorite.js?ver=1790169951

js arzdigital.com collected 2026-09-24 09:46:26 UTC 3,222 bytes, 78 lines download raw bytes

1(function($){
2    $(function($){
3        var coins_cookie = arzDigital.getCookie('favorites'),
4            star_full = $('<i class="uicon icon-star-filled arz-icon arz-icon-star-full"></i>');
5        
6        if (coins_cookie) {
7            coins_cookie = JSON.parse(coins_cookie).coin;
8            $(".arz-coin-tr .arz-coin-table__fav-td").each(function() {
9                var self = $(this),
10                    icon = self.children(".arz-icon-star"),
11                    p = self.closest('.arz-coin-tr'),
12                    slug = p.data('slug');
13    
14                if (slug && coins_cookie.includes(slug)) {
15                    self.attr('data-sort-value', 1);
16                    icon.replaceWith(star_full.clone());
17                }
18                icon.removeClass('arz-v-hidden');
19            });
20            
21        }else{
22            $(".arz-coin-tr .arz-coin-table__fav-td .arz-icon-star").removeClass('arz-v-hidden');
23        }
24
25        $(document).on("click", ".arz-coin-table__fav-td", function() {
26            var self = $(this),
27                slug = self.closest(".arz-coin-tr").data("slug"),
28                type = self.data('type'),
29                sicon = $(".arz-coin-page__under-supervision .arz-icon:not(.arz-icon-secondary)"),
30                added = true, star_icon,
31                index, cookie;
32    
33            if (slug && !self.data("disable")) {
34                cookie = arzDigital.getCookie('favorites');
35                if (cookie && cookie != "undefined") {
36                    cookie = JSON.parse(cookie);
37                } else {
38                    cookie = {};
39                }
40                type = type ? type : 'coin';
41                if (cookie && cookie[type]) {
42                    index = cookie[type].indexOf(slug);
43                    if (index > -1) {
44                        cookie[type].splice(index, 1);
45                        added = false;
46                    } else {
47                        cookie[type].push(slug);
48                    }
49                } else {
50                    cookie[type] = [slug];
51                }
52
53                if (added) {
54                    
55                    self.find(".arz-icon").replaceWith(star_full.clone());
56                    sicon.replaceWith(star_full.clone());
57                    $(".arz-icon-secondary").addClass('arz-coin-page__under-supervision-animation');
58                    setTimeout(function() {
59                        $(".arz-coin-page__under-supervision .arz-icon").removeClass('arz-coin-page__under-supervision-animation');
60                    }, 350);
61                    
62                } else {
63                    star_icon = $('<i class="uicon icon-star arz-icon arz-icon-star"></i>');
64                    self.find(".arz-icon").replaceWith(star_icon.clone());
65                    sicon.replaceWith(star_icon.clone());
66                }
67    
68                self.data("sort-value", added ? 1 : 0);
69                if (added) {
70                    self.trigger("addfav.arz");
71                } else {
72                    self.trigger("removefav.arz");
73                }
74            }
75            arzDigital.setCookie('favorites', JSON.stringify(cookie), 365);
76        });
77    });
78})(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.