PageSourceSearch

https://midoribikinis.com/cdn/shop/t/1524/assets/mini-cart.js.liquid?v=109681220703837056801790182618

js midoribikinis.com collected 2026-09-28 05:46:12 UTC 11,407 bytes, 145 lines download raw bytes

1 
2
3/* popup code start */
4function drawerActivitycontrol() {
5  document.getElementById('cart-icon').addEventListener('click', function(event) {
6    event.preventDefault();
7    document.querySelectorAll('.offcanvas-backdrop').forEach(backdrop => backdrop.remove());
8    const cartOffCanvas = new bootstrap.Offcanvas(document.getElementById('cartOffCanvas'));
9    cartOffCanvas.show();
10  });
11  document.getElementById('cart-icon').click();
12}
13
14function showSuccessPopup(product, price, cmpprice, unit_price) { 
15  if (!product || Object.keys(product).length === 0) {
16    return;
17  }
18  var unit_price = unit_price | 0;
19  var formattedPrice = (price);
20  var formattedComparePrice = cmpprice ? (cmpprice) : '';
21 
22
23  var recipientEmail = product.properties?.["Recipient email"] ? `<p class="mb-1">${window.translations?.recipient_email || 'Recipient email'}: ${product.properties["Recipient email"]}</p>` : '';
24  var recipientName = product.properties?.["Recipient name"] ? `<p class="mb-1">${window.translations?.recipient_name || 'Recipient name'}: ${product.properties["Recipient name"]}</p>` : '';
25  var giftMessage = product.properties?.["Message"] ? `<p class="mb-1">${window.translations?.message || 'Message'}: ${product.properties["Message"]}</p>` : '';
26  var sendOnDate = product.properties?.["Send on"] ? `<p class="mb-1">${window.translations?.send_on || 'Send on'}: ${product.properties["Send on"]}</p>` : '';
27 
28  let variantOptionsHTML = '';
29  
30  if (product.options_with_values && product.options_with_values.length > 0) { 
31    const optionValues = product.options_with_values.map(option => option.value).join(' / ');
32    variantOptionsHTML = `
33      <div class="variant-options mt-1">
34        <span class="fw-normal">${optionValues}</span>
35      </div>
36    `;
37    } else if (product.option1 || product.option2 || product.option3) { 
38    const options = [product.option1, product.option2, product.option3].filter(Boolean).join(' / ');
39    if (options) {
40      variantOptionsHTML = `
41        <div class="variant-options mt-1">
42          <span class="fw-normal">${options}</span>
43        </div>
44      `;
45    }
46  }
47
48  let unitPriceHTML = '';
49  if (unit_price != 0 && unit_price) {
50    unitPriceHTML = `
51      <div class="d-flex flex-wrap gap-2 unit-price">
52        <p class="m-0 price">${unit_price}</p>
53      </div>
54    `;
55  }
56   currency_symbol = window.routes.cart_currency
57  let popup = `
58    <div class="cart-popup card_product_detail" id="popup" tabindex="0">
59      <div class="cart_message">
60        <div class="d-flex justify-content-center flex-wrap gap-1 align-items-baseline">
61          <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="currentColor" class="bi bi-check-circle-fill mt-1 mt-md-0 text-success" viewBox="0 0 16 16">
62            <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"/>
63          </svg>
64          <span>{{ 'sections.cart.product-added' | t }}</span>
65        </div>
66      </div>
67      <div class="cart-popup-content mt-4">
68      <div class="card_img card_product_detail">
69      ${product.image 
70        ? `<img src="${product.image}" alt="${product?.product_title || product.title}" />` 
71        : `<svg class="placeholder-svg popup" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 525.5 525.5"><path d="M375.5 345.2c0-.1 0-.1 0 0 0-.1 0-.1 0 0-1.1-2.9-2.3-5.5-3.4-7.8-1.4-4.7-2.4-13.8-.5-19.8 3.4-10.6 3.6-40.6 1.2-54.5-2.3-14-12.3-29.8-18.5-36.9-5.3-6.2-12.8-14.9-15.4-17.9 8.6-5.6 13.3-13.3 14-23 0-.3 0-.6.1-.8.4-4.1-.6-9.9-3.9-13.5-2.1-2.3-4.8-3.5-8-3.5h-54.9c-.8-7.1-3-13-5.2-17.5-6.8-13.9-12.5-16.5-21.2-16.5h-.7c-8.7 0-14.4 2.5-21.2 16.5-2.2 4.5-4.4 10.4-5.2 17.5h-48.5c-3.2 0-5.9 1.2-8 3.5-3.2 3.6-4.3 9.3-3.9 13.5 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.4 1.8.1 3.7 1.5 5 1.2 1.2 2.9 1.9 4.7 1.9z"></path><path d="M241.2 349.6h.3c.8 0 1.4-.7 1.4-1.5s-.7-1.4-1.5-1.4c-2.3.1-4.6-1.7-5.1-4-.2-.8-.9-1.3-1.7-1.1-.8.2-1.3.9-1.1 1.7.7 3.5 4.1 6.3 7.7 6.3zm-9.7 3.6c.2 0 .3 0 .5-.1 1.6-.6 3-1.6 4.2-2.8.5-.6.5-1.5-.1-2s-1.5-.5-2 .1c-.8.9-1.8 1.6-3 2.1-.7.3-1.1 1.1-.8 1.8 0 .6.6.9 1.2.9z">
72            </path>
73            </svg>`
74      }
75    </div>
76         
77        <div class="cart-popup-text">
78          {% if settings.Show_vendor_cart %}
79            <p class="mb-2 vendor text-uppercase">${product.vendor}</p>
80          {% endif %}
81          <h6 class="mb-1">${product?.product_title || product.title}</h6>
82          <div class="mb-1">${variantOptionsHTML}</div>
83          <div class="d-flex flex-wrap gap-2 price">
84            <p class="m-0 price">${(price)} ${currency_symbol}</p>
85            ${cmpprice ? `<p class="m-0 price text-decoration-line-through">${cmpprice} ${currency_symbol}</p>` : ''}
86          </div>
87          ${unitPriceHTML}
88          <span class="subscription_minicart mb-2">
89            ${product.selling_plan_allocation ? product.selling_plan_allocation.selling_plan.name : ''}
90          </span>
91          ${product.gift_card ? `
92            <div class="gift-card-details mt-2">
93              ${recipientEmail}
94              ${recipientName}
95              ${giftMessage}
96              ${sendOnDate}
97            </div>
98          ` : ''}
99          <div class="discount">
100            ${
101              product.line_level_discount_allocations?.length > 0 ? `
102              <span class="cart-product-discounts">
103                <ul class="cart-product-discounts-list p-0" role="list" aria-label="{{ 'customer.order.discount' | t }}">
104                  ${product.line_level_discount_allocations.map(discount_allocation => `
105                    <li class="cart-product-discounts-list-item list-unstyled">
106                      <span class="cart-product-discounts-list-item__title">
107                        <span class="badges sale_badge fw-bold text-uppercase">${discount_allocation.discount_application.title}</span>
108                      </span>
109                    </li>
110                  `).join('')}
111                </ul>
112              </span>` : ''
113            }
114          </div>
115        </div>
116        <div class="close m-3 my-md-4 position-absolute top-0 end-0 shadow-none">
117          <button type="button" class="btn-close m-0 close_popup" aria-label="Close"></button>
118        </div>
119      </div>
120      <div class="d-grid mt-4 gap-3">
121        <a class="btn btn-secondary  popup_cart" href="/cart">{{ 'sections.cart.cart-page' | t }}</a>
122        <a class="btn btn-primary  popup_checkout" href="/checkout">{{ 'sections.cart.checkout' | t }}</a>
123      </div>
124    </div>
125  `;
126
127  $('body').append(popup);
128
129  $('.close_popup').on('click', function() {
130    $('.cart-popup').fadeOut(100, function() {
131      $(this).remove();
132    });
133  });
134
135  const scrollY = window.scrollY || window.pageYOffset;
136  const scrollvalue = scrollY + 20;
137  window.addEventListener("scroll", function () {
138    if (window.scrollY > scrollvalue) {
139      $('.cart-popup').fadeOut(100, function() {
140        $(this).remove();
141      });
142    }
143  });
144}
145/* popup code end */

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.