PageSourceSearch

https://profizdeliya.ru/local/templates/profizdeliya/js/equalize_ext.js

js profizdeliya.ru collected 2026-10-07 04:34:10 UTC 2,846 bytes, 110 lines download raw bytes

1$.fn.equalizeHeightsExt = function( outer, classNull, minHeight ){
2	var maxHeight = this.map( function( i, e ){
3		var minus_height=0,
4			calc_height=0;
5		if(classNull!==false){
6			minus_height=parseInt($(e).find(classNull).actual('outerHeight'));
7		}
8		if(minus_height)
9			minus_height+=12;
10		$(e).css('height', '');
11		if( outer == true ){
12			calc_height=$(e).actual('outerHeight')-minus_height;
13		}else{
14			calc_height=$(e).actual('height')-minus_height;			
15		}
16		/*if(minHeight!==false){
17			if(calc_height<minHeight){
18				calc_height+=(minHeight-calc_height);
19			}
20			if(window.matchMedia('(max-width: 520px)').matches){
21				calc_height=300;
22			}
23			if(window.matchMedia('(max-width: 400px)').matches){
24				calc_height=200;
25			}
26		}*/
27		return calc_height;
28	}).get();
29	
30	for(var i = 0, c = maxHeight.length; i < c; ++i){
31		if(maxHeight[i] % 2){
32			--maxHeight[i];
33		}
34	}
35
36
37	return this.height( Math.max.apply( this, maxHeight ) );
38}
39
40$.fn.sliceHeightExt = function( options ){
41	function _slice(el){
42		el.each(function() {
43			$(this).css('line-height', '');
44			$(this).css('height', '');
45		});
46		if(typeof(options.autoslicecount) == 'undefined' || options.autoslicecount !== false){
47			var elw = (el.first().hasClass('item') ? el.first().outerWidth() : el.first().parents('.item').outerWidth());
48			var elsw = el.first().parents('.top_wrapper').outerWidth();
49			if(!elw){
50				if(options.parent){
51					elw=el.closest(options.parent).outerWidth()-5;
52				}else{
53					elw=el.first().outerWidth()-5;
54				}
55			}
56			if(!elsw){
57				elsw = el.first().parents('.row').outerWidth();
58			}
59			if(elsw && elw){
60				options.slice = Math.floor(elsw / elw);
61			}
62		}
63		if(options.slice){
64			for(var i = 0; i < el.length; i += options.slice){
65				$(el.slice(i, i + options.slice)).equalizeHeightsExt(options.outer, options.classNull, options.minHeight);
66			}
67		}
68		if(options.lineheight){
69			var lineheightAdd = parseInt(options.lineheight);
70			if(isNaN(lineheightAdd)){
71				lineheightAdd = 0;
72			}
73			el.each(function() {
74				$(this).css('line-height', ($(this).actual('height') + lineheightAdd) + 'px');
75			});
76		}
77	}
78	var options = $.extend({
79		slice: null,
80		outer: false,
81		lineheight: false,
82		autoslicecount: true,
83		classNull: false,
84		minHeight: false,
85		options: false,
86		parent: false,
87	}, options);
88
89	var el = $(this);
90	_slice(el);
91
92	BX.addCustomEvent('onWindowResize', function(eventdata) {
93		ignoreResize.push(true);
94		_slice(el);
95		ignoreResize.pop();
96	});
97}
98
99var timerResize = false, ignoreResize = [];
100$(window).resize(function(){
101	if(!ignoreResize.length){
102		if(timerResize){
103			clearTimeout(timerResize);
104			timerResize = false;
105		}
106		timerResize = setTimeout(function(){
107			BX.onCustomEvent('onWindowResize', false);
108		}, 100);
109	}
110});

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.