PageSourceSearch

https://www.candk.asn.au/themes/fluffiness/custom/js/ck_hunt.js?v=10.6.15

js candk.asn.au collected 2026-09-24 19:34:43 UTC 2,406 bytes, 78 lines download raw bytes

1(function ($) {
2  $(document).ready(function () {
3    const target_link = window.location.href;
4    const main_url = target_link.split('?')[0];
5    const final_url = main_url.split('#')[0];
6
7    // localStorage.removeItem('hunt_ck');
8
9    if ($('.blk_hunt_image').length > 0) {
10      $('.blk_hunt_image').each(function () {
11        const target_id = $(this).attr('id');
12        const target_number = $(this).attr('data-amount');
13
14        if (localStorage.getItem('hunt_ck')) {
15          const hunt_ck = JSON.parse(localStorage.getItem('hunt_ck'));
16
17          if (hunt_ck[target_id]) {
18            const number = hunt_ck[target_id].length;
19            $('#blk_hunt_found').text(number);
20
21            if(number < target_number){
22              if (hunt_ck[target_id].includes(final_url)) {
23              }else{
24                $(this).removeClass('hidden');
25              }
26            }else{
27              $(this).remove();
28            }
29            
30          }else{
31            $(this).removeClass('hidden');
32          }
33        }else{
34          $(this).removeClass('hidden');
35        }
36
37        // Click event handler
38        $(this).on('click', function () {
39          let hunt_ck = localStorage.getItem('hunt_ck');
40          if (!hunt_ck) {
41            hunt_ck = {};
42          } else {
43            hunt_ck = JSON.parse(hunt_ck);
44          }
45
46          if (!hunt_ck[target_id]) {
47            hunt_ck[target_id] = [];
48          }
49
50          if (!hunt_ck[target_id].includes(final_url)) {
51            hunt_ck[target_id].push(final_url);
52          }
53
54          localStorage.setItem('hunt_ck', JSON.stringify(hunt_ck));
55
56          if (hunt_ck[target_id].length >= target_number) {
57            $('#blk_hunt_form').removeClass('hidden').addClass('block');
58            $('body').addClass('overflow-hidden');
59          }
60
61          $(this).addClass('hidden');
62          $(this).siblings('.blk_hunt_succeed').addClass('active');
63        });
64      });
65
66      $('#close_hunt_form').on('click', function(){
67        $('#blk_hunt_form').addClass('hidden').removeClass('block');
68        $('body').removeClass('overflow-hidden');
69      })
70    }
71
72    if ($('.treasure_banner').length && $('.desktop_nav .menu_section').length) {
73      $('.treasure_banner').insertBefore($('.desktop_nav .menu_section'));
74      $('.treasure_banner').clone().insertBefore($('.mobile_nav')).addClass('mobile_only');
75    }
76  });
77})(jQuery);
78

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.