PageSourceSearch

https://artschool-3.ru/js/helpers.js

js artschool-3.ru collected 2026-10-05 00:10:53 UTC 2,200 bytes, 91 lines download raw bytes

1(function($) {
2	$.fixHeightColumns = function() {
3		function getBottom(elem) {
4			return elem.offset().top + elem.height();
5		}
6
7		$.unfixHeightColumns();
8
9		var columns = $('#content-content:visible, #column1-content:visible, #column2-content:visible'),
10			maxBottom = 0;
11
12		columns.each(function() {
13			var bottom = getBottom($(this));
14			if (bottom > maxBottom) {
15				maxBottom = bottom;
16			}
17		});
18
19		columns.each(function() {
20			var column = $(this);
21			if (getBottom(column) < maxBottom) {
22				column.height(maxBottom - column.offset().top);
23			}
24		});
25	};
26
27	$.unfixHeightColumns = function() {
28		$('#content-content:visible, #column1-content:visible, #column2-content:visible').each(function() {
29			$(this).height('');
30		});
31	};
32
33	$.startFixHeightColumns = function() {
34		$.fixHeightColumns();
35		return setInterval(function() {
36			$.fixHeightColumns();
37		}, 500);
38	};
39
40	$.fixWatermarkHeight = function() {
41		$('.external-middle').height(
42			$('#layout').height() - $('.external-top').height() - $('.promofooter').outerHeight()
43		);
44	};
45
46	$.startFixWatermarkHeight = function() {
47		$.fixWatermarkHeight();
48		return setInterval(function() {
49			$.fixWatermarkHeight();
50		}, 500);
51	};
52
53	$(function() {
54		if (!window.getView || window.getView() !== 'mobile') {
55			if ($.browser.msie && $.browser.version < 10) {
56				$('.unsupported').show();
57			} else {
58				window.fixWatermarkHeightId = $.startFixWatermarkHeight();
59
60				if (typeof fixHeightColumns !== 'undefined' && fixHeightColumns) {
61					window.fixWHeightColumnsId = $.startFixHeightColumns();
62				}
63			}
64		}
65	});
66})(jQuery || siteBuilderJs);
67
68/**
69 * Return cookie value by name
70 * @param {String} name
71 * @return {String|Null} value
72 */
73function getCookie (name) {
74	var matches = document.cookie.match(name + '=(.*?)(;|$)');
75	return matches ? matches[1] : null;
76}
77
78/**
79 * Set cookie
80 * @param {String} name
81 * @param {String} value
82 * @param {Number} days
83 * @param {Boolean} isAllPages
84 */
85function setCookie (name, value, days, isAllPages) {
86	var expires = new Date(),
87		path = isAllPages ? '; path=/' : '';
88
89	expires.setDate(expires.getDate() + days);
90	document.cookie = name + '=' + value + path + '; expires=' + expires.toUTCString();
91}

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.