PageSourceSearch

https://sms.su/bitrix/templates/aspro-allcorp2/components/bitrix/news.list/news-blog2/script.js

js sms.su collected 2026-10-08 22:48:34 UTC 2,184 bytes, 83 lines download raw bytes

1equalWideBlockHeight = function(){
2	if($('.wide-block').length) //sliceheight for wide block
3	{
4		if(window.matchMedia('(min-width: 768px)').matches)
5		{
6			$('.wide-block').each(function(){
7				$(this).css('height', '');
8				var _this = $(this),
9					parent_block = _this.closest('.items'),
10					block_height = _this.actual('outerHeight', { includeMargin : true })-1,
11					margin = parseInt($('.wide-block').css('margin-bottom')),
12					equal_height = 0;
13
14				if(parent_block.find('.col-item').length)
15				{
16					parent_block.find('.col-item .item').css('height', '');
17					parent_block.find('.col-item').each(function(){
18						equal_height += $(this).find('.item').actual('outerHeight', { includeMargin : true });
19					})
20					if(equal_height)
21					{
22						equal_height -= margin;
23						if(equal_height >= block_height-margin)
24							_this.css('height', equal_height);
25						else
26						{
27							equal_height += margin;
28							var last_item = parent_block.find('.col-item:last-child .item');
29							last_item.css('height', (last_item.actual('outerHeight') + (block_height - equal_height)));
30						}
31					}
32				}
33			})
34		}
35		else
36		{
37			$('.wide-block').css('height', '');
38			$('.col-item .item').css('height', '');
39		}
40	}	
41}
42$(document).ready(function(){
43	equalWideBlockHeight();
44
45	$('.banners-small.blog img').on('load', function(){
46		equalWideBlockHeight();
47		$('.banners-small .item.normal-block').sliceHeight();
48	});
49})
50
51BX.addCustomEvent('onWindowResize', function(eventdata) {
52	try{
53		ignoreResize.push(true);
54		if(!jQuery.browser.safari)
55		{
56			equalWideBlockHeight();
57		}
58		else
59		{
60			setTimeout(function() {
61				equalWideBlockHeight();
62			}, 300);
63		}
64	}
65	catch(e){}
66	finally{
67		ignoreResize.pop();
68	}
69});
70BX.addCustomEvent('onCompleteAction', function(eventdata){
71	if(eventdata.action === 'ajaxContentLoaded')
72	{
73		$(eventdata.content).find('.item').each(function(){
74			$('.banners-small.blog img').on('load', function(){
75				equalWideBlockHeight();
76				$('.banners-small .item.normal-block').sliceHeight();
77			});
78		})
79		setTimeout(function(){
80			equalWideBlockHeight();
81		}, 350);
82	}
83});

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.