1import { initPayment } from "./pay.js" 2 3import "./ga.js" 4 5if (typeof window.Airwallex == "undefined") { 6 // await load_script([ 7 // "https://checkout.airwallex.com/assets/elements.bundle.min.js", 8 // ]) 9} 10 11$(".product-box,.pay-box,.bottom").hide() 12 13var url = window.location.href 14var pathname = window.location.pathname 15 16var queryString = window.location.search 17var arr = pathname.split("/") 18 19var params = {} 20 21if (queryString) { 22 var pairs = queryString.split("&") 23 for (var i = 0; i < pairs.length; i++) { 24 var pair = pairs[i].split("=") 25 if (pair.length > 0) { 26 params[pair[0].replace("?", "")] = pair[1] 27 } 28 } 29} 30params.order = arr[3] 31console.log(pathname) 32$(".full-loading").hide() 33if (params.order) { 34 initPayment.handleSuccessOrderResult(params.key, params.order) 35} else { 36 initPayment.getCart() 37} 38//getcart 39// initPayment.getCart() 40//coupon 41$(".coupon-text").on("click", function () { 42 $(this).hide() 43 $(".coupon-con ,.coupon-btn").show() 44 $(".coupon-close").show() 45 $(".coupon-icon").hide() 46}) 47 48$(".coupon-close").on("click", function () { 49 $(".coupon-code").val("") 50 $(".coupon-icon").show() 51 $(this).hide() 52 $(".coupon-con,.coupon-btn,.success-text").hide() 53 $(".coupon-text").show() 54}) 55$(".coupon-btn").on("click", function () { 56 initPayment.addCoupon() 57}) 58$(".use-btn").on("click", function () { 59 initPayment.addCoupon(true) 60}) 61$(".copy-btn").on("click", function () { 62 initPayment.handleCopy() 63}) 64$(".email").on("change", function (e) { 65 const value = $(this).val() 66 const emailReg = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/ 67 68 if (value && !emailReg.test(value)) { 69 $(this).addClass("error") 70 $(this).parent().next(".error-tips").show() 71 } else { 72 $(this).removeClass("error") 73 $(this).parent().next(".error-tips").hide() 74 } 75}) 76 77//mask 78$(".mask-close").on("click", function (e) { 79 e.stopPropagation() 80 $(".mask").hide() 81}) 82$(".coupon-mask-close").on("click", function (e) { 83 e.stopPropagation() 84 $(".coupon-mask").hide() 85}) 86$(".safari-mask-close").on("click", function (e) { 87 e.stopPropagation() 88 $(".safari-mask").hide() 89}) 90$(".mask").on("click", function (e) { 91 if (e.target === this) { 92 $(this).hide() 93 } 94}) 95$(".agreement").on("click", function (e) { 96 e.preventDefault() 97 $(".mask").fadeIn() 98}) 99 100$(".more-img").on("click", function () { 101 $(".more-con").toggle() 102}) 103$(document).on("click", function (e) { 104 if (!$(e.target).closest(".more").length) { 105 $(".more-con").hide() 106 } 107}) 108const type = ["cardpay", "applepay", "paypal", "googlepay", "tonkeeper"] 109 110if ($("#agreement-checkbox").is(":checked")) { 111 // $(".item-type").toggleClass("type-disable-cover", false) 112 type.forEach((t) => { 113 $(`.${t}-btn`).removeClass("disabled-button") 114 }) 115 $("#googlePayButton").removeClass("disabled-button") 116 $("#applePayButton").removeClass("disabled-button") 117 $(".stripecard-submit").removeClass("disabled-button") 118 $(".adyen-checkout__button").removeClass("disabled-button") 119 $(".tonkeeper-btn").removeClass("disabled-button") 120} 121$("#agreement-checkbox").change(function () { 122 if ($(this).is(":checked")) { 123 type.forEach((t) => { 124 $(`.${t}-btn`).removeClass("disabled-button") 125 }) 126 $(".stripecard-submit").removeClass("disabled-button") 127 $("#googlePayButton").removeClass("disabled-button") 128 $("#applePayButton").removeClass("disabled-button") 129 $(".adyen-checkout__button").removeClass("disabled-button") 130 $(".tonkeeper-btn").removeClass("disabled-button") 131 } else { 132 type.forEach((t) => { 133 $(`.${t}-btn`).addClass("disabled-button") 134 }) 135 $(".stripecard-submit").addClass("disabled-button") 136 $("#googlePayButton").addClass("disabled-button") 137 $("#applePayButton").addClass("disabled-button") 138 $(".adyen-checkout__button").addClass("disabled-button") 139 $(".tonkeeper-btn").addClass("disabled-button") 140 $(".black").css("background-color", "#646464 !important") 141 } 142}) 143 144// form 145const observer = new MutationObserver((mutations) => { 146 mutations.forEach((mutation) => { 147 mutation.addedNodes.forEach((node) => { 148 if (node.nodeName.toLowerCase() === "chrome_annotation") { 149 node.replaceWith(node.textContent) 150 } 151 }) 152 }) 153}) 154 155observer.observe(document.body, { childList: true, subtree: true })
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.