PageSourceSearch

https://zabros.com.ua/bitrix/templates/zabros/js/work.min.js?v=1790401641

js zabros.com.ua collected 2026-09-26 05:42:14 UTC 11,890 bytes, 337 lines download raw bytes

1var cur_page=$("#panel").attr('data-cur_url');
2var cur_lang = ~window.location.pathname.indexOf('/ua/') ? '/ua/': '/';
3
4function MyJSFunction(){
5	$.fancybox({
6		href:cur_lang+'ajax/costum_meta.php',
7		type: 'ajax',
8		ajax : {
9			data  : 'url='+cur_page
10			},
11		padding:0,
12		wrapCSS: 'fancybox-popup'
13	   });
14}
15
16
17function myFunction(user_id){
18		$.ajax({
19			url: cur_lang+'ajax/fav_count_update.php',
20			type: "POST",
21			dataType: "json",
22			data: {
23					"user_id": user_id,
24				  },
25				success: function(j) {
26					if (j) {
27						$('.deferred .counter').html(j);
28					}
29				},
30		});
31    return false;
32	}
33
34$(window).load(function(){
35	var user_id=$('.deferred .counter').attr("user_id");
36	if (user_id>0) {
37		myFunction(user_id);
38	}
39
40});
41
42
43
44
45
46
47
48
49$(document).ready(function () {
50	$("body").on('click', ".basket_popup", function(){
51		$('#loader').show();
52        $.fancybox({
53			href:cur_lang+'ajax/basket.php',
54			type: 'ajax',
55			padding:0,
56			wrapCSS: 'fancybox-popup',
57			afterLoad : function(instance, current) {
58				$('#loader').hide();
59			},
60		   });
61	   });
62
63
64	$("body").on('click', ".btn_subscribe", function(){
65		var product_id=$(this).attr('product_id');
66        $.fancybox({
67                    href:cur_lang+'ajax/subscribe_product.php',
68					ajax : {
69							data  : 'product_id='+product_id
70						},
71                    type: 'ajax',
72                    padding:0,
73                    wrapCSS: 'fancybox-popup'
74                   });
75	   });
76
77
78	$("body").on('click', ".callback-link", function(){
79        $.fancybox({
80                    href:cur_lang+'ajax/request_call.php',
81                    type: 'ajax',
82                    padding:0,
83                    wrapCSS: 'fancybox-popup'
84                   });
85	   });
86
87	$("body").on('click', ".auth_popup", function(){
88        $.fancybox({
89                    href:cur_lang+'ajax/auth_popup.php',
90                    type: 'ajax',
91                    padding:0,
92                    wrapCSS: 'fancybox-popup'
93                   });
94	   });
95
96	$("body").on('click', ".delete_compare_section", function(){
97		var section_code=$(this).attr('section_code');
98		var count_element=$(this).attr('count_element');
99		var all_element=$('.comparison .counter').html();
100		var li=$(this).parent('li');
101
102		$.ajax({
103			url: cur_lang+'ajax/delete_compare.php',
104			type: "POST",
105			dataType: "json",
106			data: {
107					"section_code": section_code,
108				  },
109				success: function(j) {
110					if (j) {
111						li.remove();
112						$('.comparison .counter').html(all_element-count_element);
113					}
114
115				},
116		});
117
118		return false;
119	   });
120
121
122
123	$("body").on('click', ".marker-element", function(){
124
125        //console.log($(this));
126        obj=$(this);
127        var user_id=obj.data('user-id');
128        //alert('_'+user_id+'_');
129        var product_id=obj.data('product-id');
130        var product_delete;
131
132        //if (!user_id) {
133        //    $('#fav_not_login').show();
134        //}
135
136        if (obj.data('product-delete'))
137        {
138            product_delete = obj.data('product-delete');
139        }
140        else
141		{
142            product_delete="N";
143        }
144
145        $.ajax({
146            url: cur_lang+'ajax/add_favorite.php',
147            type: "POST",
148            dataType: "json",
149            data: {
150                "user_id": user_id,
151                "product_id": product_id,
152                "product_delete":product_delete
153            },
154            success: function($count_fav_list) {
155				if ($count_fav_list['status']) {
156					if (product_delete=="Y") {
157                        $(obj).parents('li').remove();
158						$('.deferred .counter').html($count_fav_list['quantity']);
159                    }
160					else if($count_fav_list['in_list'])
161					{
162
163						$('#window-favorite .ok_text').html($('#window-favorite .ok_text').data('productInBookmarks'));
164
165						$.fancybox("#window-favorite",{
166							padding:0,
167							wrapCSS: 'fancybox-popup'
168						   });
169					}
170					else{
171						$('.deferred .counter').html($count_fav_list['quantity']);
172
173						$('#window-favorite .ok_text').html($('#window-favorite .ok_text').data('productAdded'));
174
175						$.fancybox("#window-favorite",{
176							padding:0,
177							wrapCSS: 'fancybox-popup'
178						   });
179					}
180
181                }
182				else if($count_fav_list['Login']=='N')
183				{
184					$.fancybox({
185						href:cur_lang+'ajax/auth_popup.php',
186						type: 'ajax',
187						padding:0,
188						wrapCSS: 'fancybox-popup'
189					   });
190				}
191
192
193               // console.log($count_fav_list);
194               // console.log(obj);
195
196                //if ($count_fav_list['Login']!=undefined)
197                //{
198                //    // alert('авторизируйтесь');
199                //    $('#fav_not_login').show();
200                //
201                //
202                //}
203                //else {
204                //    if ($count_fav_list['id']!=undefined)
205                //    {
206                //        $("#"+$count_fav_list['id']).hide();
207                //    }
208                //
209                //    $(obj).hide();
210                //
211                //    //$(".fav_count").html($count_fav_list["quantity"]);
212                //    if ($count_fav_list['hide_class']!=undefined)
213                //    {
214                //        window.location.reload();
215                //    }
216                //    //alert('добавили в избранное');
217                //}
218            }
219        });
220
221        //if (user_id!=0){
222        //    $.ajax({
223        //        url: '/statistic.php',
224        //        type: 'post',
225        //        data  : {
226        //            'id_adv': product_id,
227        //            'action':'add_to_favorite'
228        //        }
229        //    });
230        //}
231
232
233        return false;
234    });
235
236
237
238
239	$("body").on('click', ".buy_product", function(){
240		if ($(this).hasClass("basket_popup")) {
241			return false;
242		}
243
244		var product_id=$(this).attr('product_id');
245		var quantity=$(this).attr('quantity');
246
247		$('#loader').show();
248		BX.ajax({
249			url: cur_lang+'ajax/buy_product.php',
250			method: 'POST',
251			dataType: 'json',
252			data: {
253				"product_id": product_id,
254				"quantity":quantity,
255			},
256			onsuccess: function(result)
257			{
258				BX.onCustomEvent('OnBasketChange');
259				if (data='true') {
260					$.fancybox.open({
261						href:cur_lang+'ajax/basket.php',
262						type: 'ajax',
263						padding:0,
264						wrapCSS: 'fancybox-popup',
265						afterLoad : function(instance, current) {
266							$('#loader').hide();
267						},
268					});
269				}
270			}
271		});
272
273		/*$.ajax({
274			url: cur_lang+'ajax/buy_product.php',
275			type: "POST",
276			dataType: "json",
277			data: {
278				"product_id": product_id,
279				"quantity":quantity,
280			},
281			success: function(data) {
282				BX.onCustomEvent('OnBasketChange');
283				if (data='true') {
284					$.fancybox.open({
285						href:cur_lang+'ajax/basket.php',
286						type: 'ajax',
287						padding:0,
288						wrapCSS: 'fancybox-popup',
289						afterLoad : function(instance, current) {
290							$('#loader').hide();
291						},
292					});
293				}
294			},
295			beforeSend: function() {
296				$('#loader').show();
297			},
298			complete: function() {
299				// $('#loader').hide();
300			}
301		});*/
302
303		return false;
304	});
305
306});
307
308/*mask START*/
309!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b,c=navigator.userAgent,d=/iphone/i.test(c),e=/chrome/i.test(c),f=/android/i.test(c);a.mask={definitions:{9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},autoclear:!0,dataName:"rawMaskFn",placeholder:"_"},a.fn.extend({caret:function(a,b){var c;if(0!==this.length&&!this.is(":hidden"))return"number"==typeof a?(b="number"==typeof b?b:a,this.each(function(){this.setSelectionRange?this.setSelectionRange(a,b):this.createTextRange&&(c=this.createTextRange(),c.collapse(!0),c.moveEnd("character",b),c.moveStart("character",a),c.select())})):(this[0].setSelectionRange?(a=this[0].selectionStart,b=this[0].selectionEnd):document.selection&&document.selection.createRange&&(c=document.selection.createRange(),a=0-c.duplicate().moveStart("character",-1e5),b=a+c.text.length),{begin:a,end:b})},unmask:function(){return this.trigger("unmask")},mask:function(c,g){var h,i,j,k,l,m,n,o;if(!c&&this.length>0){h=a(this[0]);var p=h.data(a.mask.dataName);return p?p():void 0}return g=a.extend({autoclear:a.mask.autoclear,placeholder:a.mask.placeholder,completed:null},g),i=a.mask.definitions,j=[],k=n=c.length,l=null,a.each(c.split(""),function(a,b){"?"==b?(n--,k=a):i[b]?(j.push(new RegExp(i[b])),null===l&&(l=j.length-1),k>a&&(m=j.length-1)):j.push(null)}),this.trigger("unmask").each(function(){function h(){if(g.completed){for(var a=l;m>=a;a++)if(j[a]&&C[a]===p(a))return;g.completed.call(B)}}function p(a){return g.placeholder.charAt(a<g.placeholder.length?a:0)}function q(a){for(;++a<n&&!j[a];);return a}function r(a){for(;--a>=0&&!j[a];);return a}function s(a,b){var c,d;if(!(0>a)){for(c=a,d=q(b);n>c;c++)if(j[c]){if(!(n>d&&j[c].test(C[d])))break;C[c]=C[d],C[d]=p(d),d=q(d)}z(),B.caret(Math.max(l,a))}}function t(a){var b,c,d,e;for(b=a,c=p(a);n>b;b++)if(j[b]){if(d=q(b),e=C[b],C[b]=c,!(n>d&&j[d].test(e)))break;c=e}}function u(){var a=B.val(),b=B.caret();if(a.length<o.length){for(A(!0);b.begin>0&&!j[b.begin-1];)b.begin--;if(0===b.begin)for(;b.begin<l&&!j[b.begin];)b.begin++;B.caret(b.begin,b.begin)}else{for(A(!0);b.begin<n&&!j[b.begin];)b.begin++;B.caret(b.begin,b.begin)}h()}function v(){A(),B.val()!=E&&B.change()}function w(a){if(!B.prop("readonly")){var b,c,e,f=a.which||a.keyCode;o=B.val(),8===f||46===f||d&&127===f?(b=B.caret(),c=b.begin,e=b.end,e-c===0&&(c=46!==f?r(c):e=q(c-1),e=46===f?q(e):e),y(c,e),s(c,e-1),a.preventDefault()):13===f?v.call(this,a):27===f&&(B.val(E),B.caret(0,A()),a.preventDefault())}}function x(b){if(!B.prop("readonly")){var c,d,e,g=b.which||b.keyCode,i=B.caret();if(!(b.ctrlKey||b.altKey||b.metaKey||32>g)&&g&&13!==g){if(i.end-i.begin!==0&&(y(i.begin,i.end),s(i.begin,i.end-1)),c=q(i.begin-1),n>c&&(d=String.fromCharCode(g),j[c].test(d))){if(t(c),C[c]=d,z(),e=q(c),f){var k=function(){a.proxy(a.fn.caret,B,e)()};setTimeout(k,0)}else B.caret(e);i.begin<=m&&h()}b.preventDefault()}}}function y(a,b){var c;for(c=a;b>c&&n>c;c++)j[c]&&(C[c]=p(c))}function z(){B.val(C.join(""))}function A(a){var b,c,d,e=B.val(),f=-1;for(b=0,d=0;n>b;b++)if(j[b]){for(C[b]=p(b);d++<e.length;)if(c=e.charAt(d-1),j[b].test(c)){C[b]=c,f=b;break}if(d>e.length){y(b+1,n);break}}else C[b]===e.charAt(d)&&d++,k>b&&(f=b);return a?z():k>f+1?g.autoclear||C.join("")===D?(B.val()&&B.val(""),y(0,n)):z():(z(),B.val(B.val().substring(0,f+1))),k?b:l}var B=a(this),C=a.map(c.split(""),function(a,b){return"?"!=a?i[a]?p(b):a:void 0}),D=C.join(""),E=B.val();B.data(a.mask.dataName,function(){return a.map(C,function(a,b){return j[b]&&a!=p(b)?a:null}).join("")}),B.one("unmask",function(){B.off(".mask").removeData(a.mask.dataName)}).on("focus.mask",function(){if(!B.prop("readonly")){clearTimeout(b);var a;E=B.val(),a=A(),b=setTimeout(function(){z(),a==c.replace("?","").length?B.caret(0,a):B.caret(a)},10)}}).on("blur.mask",v).on("keydown.mask",w).on("keypress.mask",x).on("input.mask paste.mask",function(){B.prop("readonly")||setTimeout(function(){var a=A(!0);B.caret(a),h()},0)}),e&&f&&B.off("input.mask").on("input.mask",u),A()})}})});
310
311
312jQuery(function($){
313       $(".phone").not('select').mask("+38 (999) 999-99-99");
314});
315
316/*mask END*/
317
318$('.seo-text').readmore();
319
320document.addEventListener('DOMContentLoaded', () => {
321
322    const showContactsBtn = document.querySelector('.show-contacts');
323    const contactsContent = document.querySelector('.header-phones');
324
325    if (!showContactsBtn || !contactsContent) return;
326
327    showContactsBtn.addEventListener('click', () => {
328        console.log('click !')
329        if (contactsContent.classList.contains('show')) {
330            console.log('has !')
331            contactsContent.classList.remove('show');
332        } else {
333            console.log('not has !')
334            contactsContent.classList.add('show');
335        }
336    });
337});

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.