https://evro-stroy.dp.ua/wp-content/plugins/buy-one-click-woocomme…=2.6.0.pagespeed.ce.wxj_3CaGO4.js
1//(function (jQuery, undefinde) { 2 3jQuery(document).ready(function () { 4 jQuery(document).on('click', '.popup .close_order, .overlay', function (e) { 5 e.preventDefault(); 6 jQuery('.popup, .overlay').css({'opacity': '0', 'visibility': 'hidden'}); 7 jQuery('#buyoneclick_form_order input:checkbox').removeAttr("checked"); 8 jQuery('#buyoneclick_form_order input[type=hidden].valTrFal').val('valTrFal_disabled'); 9 buyone_click_body_scroll(); 10 }); 11 12 jQuery(function () { 13 jQuery('#buyoneclick_form_order input:checkbox').change(function () { 14 if (jQuery(this).is(':checked')) { 15 jQuery('#buyoneclick_form_order input[type=hidden].valTrFal').val('valTrFal_true'); 16 } else { 17 18 jQuery('#buyoneclick_form_order input[type=hidden].valTrFal').val('valTrFal_disabled'); 19 } 20 }); 21 }); 22 //Ðоп ÑообÑение 23 24 jQuery(document).on('click', '#formOrderOneClick .popummessage .close_message, #formOrderOneClick .overlay_message', function () { 25 jQuery('#formOrderOneClick .popummessage, #formOrderOneClick .overlay_message').css({'opacity': '0', 'visibility': 'hidden'}); 26 buyone_click_body_scroll(); 27 28 }); 29}); 30 31function getAjaxUrl() { 32 return buyone_ajax.ajaxurl; 33} 34 35function buyone_click_body_scroll() { 36 37 var formVisible = jQuery('#formOrderOneClick .popup').css('visibility') 38 39 if(formVisible === 'visible'){ 40 jQuery('body').css('overflow','hidden') 41 }else { 42 jQuery('body').css('overflow',''); 43 } 44} 45 46 47jQuery(document).ready(function () { 48 /** 49 * ÐÑпÑÐ°Ð²Ð¸Ñ ÑоÑÐ¼Ñ Ñ Ð·Ð°ÐºÐ°Ð·Ð¾Ð¼ 50 */ 51 jQuery(document).on('submit', '#buyoneclick_form_order', function (e) { 52 e.preventDefault(); 53 jQuery('#buyoneclick_form_order .buyButtonOkForm').prop('disabled', 'disabled'); 54 let root_selector = '#buyoneclick_form_order'; 55 jQuery('#buyoneclick_form_order .buyButtonOkForm').addClass('running'); 56 jQuery.ajax({ 57 url: getAjaxUrl(), 58 type: "POST", 59 data: new FormData(this), 60 cache: false, 61 processData: false, 62 contentType: false 63 }).done(function (response) { 64 setTimeout(function () { 65 jQuery("#buyoneclick_form_order .form-message-result").html(''); 66 }, 3000); 67 68 if (!response.success) { 69 jQuery(root_selector + " .form-message-result").html(response.data.message) 70 return false; 71 } 72 let orderIdenty = response.data.orderUuid; 73 if (buyone_ajax.add_an_order_to_woo_commerce) { 74 orderIdenty = response.data.orderId; 75 if (response.data.orderNumber.length > 0) { 76 orderIdenty = response.data.orderNumber; 77 } 78 } 79 if (buyone_ajax.yandex_metrica.transfer_data_to_yandex_commerce) { 80 let yandexMetrica = new BuyOneClickYandexMetrica(); 81 yandexMetrica.ecommercePurchase( 82 buyone_ajax.yandex_metrica.data_layer, 83 response.data.products, 84 buyone_ajax.yandex_metrica.goal_id, 85 orderIdenty 86 ); 87 } 88 89 if (buyone_ajax.success_action === 1) { //ÐейÑÑвие по ÑмолÑÐ°Ð½Ð¸Ñ 90 jQuery(root_selector + " .form-message-result").html(buyone_ajax.after_message_form) 91 } else if (buyone_ajax.success_action === 2) { // ÐакÑÑÑие ÑоÑÐ¼Ñ ÑеÑез action мил Ñек 92 jQuery(root_selector + " .form-message-result").html(buyone_ajax.after_message_form) 93 setTimeout(function(){ 94 jQuery('#formOrderOneClick .close_order').trigger('click'); 95 },buyone_ajax.after_submit_form); 96 } else if (buyone_ajax.success_action === 3) { // ÐоказаÑÑ ÑообÑение action 97 jQuery('#formOrderOneClick .close_order').trigger('click'); 98 jQuery('#formOrderOneClick .popummessage, #formOrderOneClick .overlay_message').css('opacity', '1'); 99 jQuery('#formOrderOneClick .popummessage, #formOrderOneClick .overlay_message').css('visibility', 'visible'); 100 } else if (buyone_ajax.success_action === 4) { // СделаÑÑ ÑедиÑÐµÐºÑ action 101 jQuery("#buyoneclick_form_order .form-message-result").html(buyone_ajax.after_message_form) 102 window.location.href = buyone_ajax.after_submit_form; 103 } else if (buyone_ajax.success_action === 5 || buyone_ajax.success_action === 6) { // СделаÑÑ ÑедиÑÐµÐºÑ WooCommerce 104 if (response.success && response.data && response.data.redirectUrl) { 105 jQuery("#buyoneclick_form_order .form-message-result").html(buyone_ajax.after_message_form) 106 window.location.href = response.data.redirectUrl; 107 } 108 } 109 if (typeof buyone_ajax.callback_successful_form_submission !== 'undefined') { 110 var callback = new Function(buyone_ajax.callback_successful_form_submission); 111 callback(); 112 } 113 }).fail(function (response) { 114 jQuery(root_selector + " .form-message-result").html('server error 500'); 115 }).always(function () { 116 jQuery('#buyoneclick_form_order .buyButtonOkForm').prop("disabled", false); 117 jQuery('#buyoneclick_form_order .buyButtonOkForm').removeClass('running'); 118 }); 119 }); 120 121 /** 122 * Ðнопка "ÐаказаÑÑ Ð² один клик" 123 * ÐаÑиÑÑÐµÑ ÑоÑÐ¼Ñ 124 */ 125 jQuery(document).on('click', 'button.clickBuyButton', function (e) { 126 e.preventDefault(); 127 let self = jQuery(this); 128 if(jQuery(self).hasClass('disabled')){ 129 return; 130 } 131 let button = jQuery(this); 132 let urlpost = window.location.href; 133 let productid = jQuery(this).attr('data-productid'); 134 let action = 'getViewForm'; 135 let variation_selected = 0; 136 let variation_attr = ''; 137 138 jQuery(button).addClass('running'); 139 140 if (typeof buyone_ajax.work_mode !== 'undefined' && buyone_ajax.work_mode == 1) { 141 action = 'buy_coderun_add_to_cart'; 142 variation_selected = jQuery(this).attr('data-variation_id'); 143 variation_attr = jQuery('.variations_form.cart').serialize(); 144 } else { 145 variation_selected = jQuery(this).attr('data-variation_id'); 146 } 147 148 jQuery.ajax({ 149 type: "POST",
150 url: getAjaxUrl(), 151 data: { 152 action: action, 153 urlpost: urlpost, 154 productid: productid, 155 variation_selected: variation_selected, 156 variation_attr: variation_attr, 157 booc_nonce: typeof buyone_ajax.nonce !== 'undefined' ? buyone_ajax.nonce : '', 158 }, 159 success: function (response) { 160 if (!response.success) { 161 return; 162 } 163 if (action === 'buy_coderun_add_to_cart') { 164 window.location.href = response.data; 165 return true; 166 } 167 jQuery('#formOrderOneClick').remove(); 168 jQuery('body').append(response.data); 169 jQuery('.popup, .overlay').css('opacity', '1'); 170 jQuery('.popup, .overlay').css('visibility', 'visible'); 171 172 if (buyone_ajax.tel_mask.length > 3) { 173 jQuery('#buyoneclick_form_order [name="txtphone"]').mask(buyone_ajax.tel_mask); 174 } 175 jQuery(button).removeClass('running'); 176 buyone_click_body_scroll(); 177 if (typeof buyone_ajax.callback_after_clicking_on_button !== 'undefined') { 178 const callback = new Function(buyone_ajax.callback_after_clicking_on_button); 179 callback(); 180 } 181 }, 182 error: function (response) { 183 184 } 185 }); 186 }); 187 jQuery(document).on('click', 'button.clickBuyButtonCustom', function (e) { 188 e.preventDefault(); 189 var zixnAjaxUrl = getAjaxUrl(); 190 var butObj = this; 191 192 var urlpost = window.location.href; 193 var productid = jQuery(butObj).attr('data-productid'); 194 var name = jQuery(butObj).attr('data-name'); 195 var count = jQuery(butObj).attr('data-count'); 196 var price = jQuery(butObj).attr('data-price'); 197 198 jQuery.ajax({ 199 type: "POST", 200 url: zixnAjaxUrl, 201 async: false, 202 data: { 203 action: 'getViewFormCustom', 204 urlpost: urlpost, 205 productid: productid, 206 name: name, 207 count: count, 208 price: price, 209 priceHtml: jQuery(butObj).attr('data-priceHtml'), 210 booc_nonce: typeof buyone_ajax.nonce !== 'undefined' ? buyone_ajax.nonce : '', 211 }, 212 success: function (response) { 213 if (!response.success) { 214 return; 215 } 216 jQuery('#formOrderOneClick').remove(); 217 jQuery(butObj).after(response.data); 218 jQuery('.popup, .overlay').css('opacity', '1'); 219 jQuery('.popup, .overlay').css('visibility', 'visible'); 220 buyone_click_body_scroll(); 221 if (typeof buyone_ajax.callback_after_clicking_on_button !== 'undefined') { 222 const callback = new Function(buyone_ajax.callback_after_clicking_on_button); 223 callback(); 224 } 225 } 226 }); 227 }); 228 229});
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.