PageSourceSearch

https://www.bestprice.vn/assets/dist/js/flight_price_alert.min.49cdb48de1.js

js bestprice.vn collected 2026-10-02 12:35:08 UTC 2,041 bytes, 1 lines download raw bytes

1!function(){"use strict";function e(){var o,r,a=document.querySelector("[data-price-alert]"),c=a&&a.querySelector("[data-price-alert-form]");a&&c&&"1"!==a.dataset.initialized&&(a.dataset.initialized="1",o=a.querySelector("[data-price-alert-message]"),r=c.querySelector('[type="submit"]'),document.addEventListener("click",function(e){var t=e.target.closest("[data-price-alert-container] .btn-next-cheapest"),n=e.target.closest(".btn-notify-cheapest");if(t||n)return e.preventDefault(),a.hidden=!1,document.body.classList.add("fcr-modal-open"),o.hidden=!0,void c.querySelector('[name="email"]').focus();e.target.closest("[data-price-alert-close]")&&(a.hidden=!0,document.body.classList.remove("fcr-modal-open"))}),c.addEventListener("submit",function(e){e.preventDefault();var t=c.elements.email.value.trim(),n=c.elements.full_name.value.trim(),a=c.elements.phone.value.replace(/\s+/g,""),s=/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t),i=/^[0-9+\-]{10,11}$/.test(a);o.hidden=!1,o.classList.remove("is-success"),t&&n&&a&&s&&i?(r.disabled=!0,r.textContent="Đang xử lý...",(e=new URLSearchParams).set("email",t),e.set("full_name",n),e.set("phone",a),e.set("url",window.location.href.split("#")[0]),fetch("/receive-ticket-cheap",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8","X-Requested-With":"XMLHttpRequest"},body:e.toString()}).then(function(e){if(!e.ok)throw new Error("HTTP "+e.status);return e.json()}).then(function(e){o.textContent=e.msg||(e.status?"Đăng ký thành công.":"Không thể đăng ký, vui lòng thử lại."),o.classList.toggle("is-success",!!e.status),e.status&&c.reset()}).catch(function(){o.textContent="Không thể kết nối, vui lòng thử lại."}).then(function(){r.disabled=!1,r.textContent="Hoàn tất"})):o.textContent=s?i?"Vui lòng nhập đầy đủ thông tin.":"Vui lòng nhập đúng số điện thoại.":"Vui lòng nhập đúng email."}))}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e()}();

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.