1document.addEventListener("DOMContentLoaded", function () { 2 // ÐÑпÑавка пеÑвой ÑоÑÐ¼Ñ Ñ name="CALLBACK" 3 let callbackForm = document.querySelector("form[name='CALLBACK']"); 4 if (callbackForm) { 5 callbackForm.addEventListener("submit", function () { 6 if (typeof ym !== "undefined") { 7 ym(82104031, "reachGoal", "callback-request-sent"); 8 } 9 }); 10 } 11 12 // ÐÑпÑавка вÑоÑой ÑоÑÐ¼Ñ Ñ id="one_click_buy_form" 13 let oneClickForm = document.getElementById("one_click_buy_form"); 14 if (oneClickForm) { 15 oneClickForm.addEventListener("submit", function () { 16 if (typeof ym !== "undefined") { 17 ym(82104031, "reachGoal", "one-click-order"); 18 } 19 }); 20 } 21 22 // Ðлик по кнопке "ÐобавиÑÑ Ð² коÑзинÑ" (class="to-cart") 23 document.querySelectorAll(".to-cart").forEach(function (button) { 24 button.addEventListener("click", function () { 25 if (typeof ym !== "undefined") { 26 ym(82104031, "reachGoal", "cart-button-click"); 27 } 28 }); 29 }); 30 31 // Ðлик по кнопке "ÐÑоÑмиÑÑ Ð·Ð°ÐºÐ°Ð·" (class="basket-btn-checkout") 32 document.querySelectorAll(".basket-btn-checkout").forEach(function (button) { 33 button.addEventListener("click", function () { 34 if (typeof ym !== "undefined") { 35 ym(82104031, "reachGoal", "place-order-click"); 36 } 37 }); 38 }); 39});
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.