PageSourceSearch

https://armyshop.com.au/content/assets/js/asCartRevamp.js

js armyshop.com.au collected 2026-10-05 19:23:32 UTC 2,751 bytes, 81 lines download raw bytes

1const ccArrowSec = `<div class="cc-cta-sec">
2    <span class="cc-left-arrow">
3      <img src="https://cdn.convertcart.com/uploads/f011fa52.webp" alt="left arrow" />
4    </span>
5    <span class="cc-ttl">Express Checkout With</span>
6    <span class="cc-right-arrow">
7      <img src="https://cdn.convertcart.com/uploads/6dbcf1d0.webp" alt="left arrow" />
8    </span>
9  </div>`;
10
11function loadFun() {
12    if (!$('.cc-cart-heading-wrapper').length) {
13      const ccpageHeading = $('.page-heading');
14      const ccnewParent = $('<div class="cc-cart-heading-wrapper"></div>');
15      ccpageHeading.before(ccnewParent);
16      ccnewParent.append(ccpageHeading);
17      const ccClearall = $('#btn-clear-cart').clone().addClass('cc-clear');
18      ccpageHeading.after(ccClearall);
19    }
20    let ccpageBtn;
21    let ccnewParentBtn;
22    let ccCheckout;
23    if (!$('.cc-cart-btnsec').length) {
24      ccpageBtn = $('.cart-additionalCheckoutButtons');
25      ccnewParentBtn = $('<div class="cc-cart-btnsec"></div>');
26      ccCheckout = $('.cart-actions').clone().addClass('cc-cart-rvp');
27    }
28    setTimeout(function () {
29      if (!$('.cc-cart-btnsec').length) {
30        // Append elements in correct order
31        $('afterpay-placement').before(ccCheckout);
32
33        // Append button section wrapper
34        $('afterpay-placement').before(ccnewParentBtn);
35        ccnewParentBtn.append(ccpageBtn);
36      }
37
38      setTimeout(() => {
39        $('.cc-cart-btnsec').prepend($(ccArrowSec));
40      }, 300);
41
42      // Check if user is logged in by finding "Sign out" in header
43      $('.header-top .header-top-list .header-top-item').each(function () {
44        if ($(this).find('.header-top-action').text().includes('Sign out')) {
45          $('.cc-cart-btnsec').addClass('cc-login-user');
46        }
47      });
48    }, 300);
49  }
50  setInterval(function () {
51    if ($('table.cart').length > 0) {
52      if ($('.cc-cart-rvp').length == 0) {
53        loadFun();
54      }
55    }
56  }, 300);
57  $('.coupon-form').on('click', '.button.button--primary.button--small', () => {
58    setTimeout(() => {
59      window.location.reload();
60    }, 1500);
61  });
62  $('.cart-gift-certificate-form').on('click', '.button.button--primary.button--small', () => {
63    setTimeout(() => {
64      window.location.reload();
65    }, 1500);
66  });
67  $('.cart-list').on('click', '.cart-remove.icon', () => {
68    setTimeout(() => {
69      window.location.reload();
70    }, 1500);
71  });
72  $('.form-increment').on('click', '.button', () => {
73    setTimeout(() => {
74      window.location.reload();
75    }, 1500);
76  });
77  $('.form-increment').on('change', '.input', () => {
78    setTimeout(() => {
79      window.location.reload();
80    }, 1500);
81  });

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.