PageSourceSearch

https://proftechservice.ru/wp-content/themes/masdaf/js/one-click-order-button.js?ver=7.1.2

js proftechservice.ru collected 2026-10-05 00:09:54 UTC 1,765 bytes, 44 lines download raw bytes

1(function($){
2  $(function(){
3
4    /* Заказ в один клик */
5
6    // Подстановка артикула в заголовок формы
7    $('.one_click_order_button').on('click', function(){
8
9      if( $(".sku").html() ) {
10        let sku = $(".sku").html();
11        $('input[name="oneclickOrderSku"]').val(sku);
12        $('#one_click_order .component__modal__title').html('Заказать артикул<br>' + sku);
13      } else {
14        $('#one_click_order .component__modal__title').html('Отправить запрос');
15        $('#one_click_order .component__main-button').html('Отправить запрос');
16        $('#one_click_order .form-result p').html('Запрос отправлен');
17      }
18
19      if( $('input[name="quantity"]')  ) {
20        let quantity = $('input[name="quantity"]').val();
21        $('input[name="oneclickOrderQuantity"]').val(quantity);
22      }
23      if( $('.woocommerce-Price-amount').html() ) {
24        let price = $('.woocommerce-Price-amount').html().replace(/<\/?[^>]+>/g,'').replace('&nbsp;',' ');
25        $('input[name="oneclickOrderPrice"]').val(price);
26      }
27    });
28
29    $('#oneclick_modal_form').submit(function (e) {
30      e.preventDefault();
31      let m_action = $(this).attr('action');
32      let m_data = $(this).serialize();
33      $.post(
34         m_action,
35         m_data
36      ).done(function(data){
37        console.log(data);
38        ym(90985257,'reachGoal','one_click_order_button');
39        $('#oneclick_modal_form, #one_click_order .component__modal__title, #one_click_order .component__modal__desc').css("display", "none");
40        $('#one_click_order .form-result').css("display", "block");
41      });
42    });
43  });
44})(jQuery);

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.