PageSourceSearch

https://zrko.ru/bitrix/templates/12_2015/script.js

js zrko.ru collected 2026-10-02 10:05:24 UTC 3,262 bytes, 139 lines download raw bytes

1function SetPrintCSS(isPrint)
2{
3	var link;
4
5	if (document.getElementsByTagName)
6		link = document.getElementsByTagName('link');
7	else if (document.all)
8		link = document.all.tags('link');
9	else
10		return;
11
12	for (var index=0; index < link.length; index++)
13	{
14		if (!link[index].title || link[index].title != 'print')
15			continue;
16
17		if (isPrint)
18		{
19			link[index].disabled = false;
20			link[index].rel = "stylesheet";
21		}
22		else
23		{
24			link[index].disabled = true;
25			link[index].rel = "alternate stylesheet";
26		}
27	}
28}
29
30function AddToBookmark()
31{
32	var title = window.document.title;
33	var url = window.document.location;
34
35	if (window.sidebar)
36	{
37		window.sidebar.addPanel(title, url, "");
38	}
39	/*else if(window.opera)
40	{
41		var a = document.createElement("A");
42		a.rel = "sidebar";
43		a.target = "_search";
44		a.title = title;
45		a.href = url;
46		a.click();
47	}*/
48	else if(document.all)
49	{
50		window.external.AddFavorite(url, title);
51	}
52	else
53	{
54		alert("Äëÿ äîáàâëåíèÿ ñòðàíèöû â Èçáðàííîå íàæìèòå Ctrl+D");
55	}
56	
57	return false;
58}
59
60function BackToDesignMode()
61{
62	if (document.all)
63		window.location.href = window.location.href.replace('#print','');
64	else
65		SetPrintCSS(false);
66
67	return false;
68}
69
70if (document.location.hash == '#print')
71	SetPrintCSS(true);
72
73if (window.jsAjaxUtil)
74{
75	// show ajax visuality
76	jsAjaxUtil.ShowLocalWaitWindow = function (TID, cont, bShadow)
77	{
78		if (typeof cont == 'string' || typeof cont == 'object' && cont.constructor == String)
79			var obContainerNode = document.getElementById(cont);
80		else
81			var obContainerNode = cont;
82		
83		if (obContainerNode.getBoundingClientRect)
84		{
85			var obRect = obContainerNode.getBoundingClientRect();
86			var obWndSize = jsAjaxUtil.GetWindowSize();
87
88			var arContainerPos = {
89				left: obRect.left + obWndSize.scrollLeft, 
90				top: obRect.top + obWndSize.scrollTop, 
91				right: obRect.right + obWndSize.scrollLeft, 
92				bottom: obRect.bottom + obWndSize.scrollTop
93			};
94		}
95		else
96			var arContainerPos = jsAjaxUtil.GetRealPos(obContainerNode);
97		
98		var container_id = obContainerNode.id;
99		
100		if (!arContainerPos) return;
101
102		var obWaitMessage = document.body.appendChild(document.createElement('DIV'));
103		obWaitMessage.id = 'wait_' + container_id + '_' + TID;
104		obWaitMessage.className = 'waitwindow';
105		
106		var div_top = arContainerPos.top + 5;
107		if (div_top < document.body.scrollTop) div_top = document.body.scrollTop + 5;
108		
109		obWaitMessage.style.top = div_top + 'px';
110		obWaitMessage.style.left = (arContainerPos.right - 200) + 'px';
111		obWaitMessage.innerHTML = 'Çàãðóçêà...';
112		
113		if(jsAjaxUtil.IsIE())
114		{
115			var frame = document.createElement("IFRAME");
116			frame.src = "javascript:''";
117			frame.id = 'waitframe_' + container_id + '_' + TID;
118			frame.className = "waitwindow";
119			frame.style.width = obWaitMessage.offsetWidth + "px";
120			frame.style.height = obWaitMessage.offsetHeight + "px";
121			frame.style.left = obWaitMessage.style.left;
122			frame.style.top = obWaitMessage.style.top;
123			document.body.appendChild(frame);
124		}
125		
126		function __Close(e)
127		{
128			if (!e) e = window.event
129			if (!e) return;
130			if (e.keyCode == 27)
131			{
132				jsAjaxUtil.CloseLocalWaitWindow(TID, cont);
133				jsEvent.removeEvent(document, 'keypress', __Close);
134			}
135		}
136		
137		jsEvent.addEvent(document, 'keypress', __Close);
138	}
139}

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.