PageSourceSearch

https://klimovo-tsdb.ru/simai/asset/simai.property/.default/js/script.js?17881730545178

js klimovo-tsdb.ru collected 2026-10-09 21:28:30 UTC 5,178 bytes, 222 lines download raw bytes

1function SFPropAddNewRow(tableID, row_to_clone)
2{
3	var tbl = document.getElementById(tableID);
4	var cnt = tbl.rows.length;
5	if(row_to_clone == null)
6		row_to_clone = -2;
7	var sHTML = tbl.rows[cnt+row_to_clone].cells[0].innerHTML;
8	var oRow = tbl.insertRow(cnt+row_to_clone+1);
9	var oCell = oRow.insertCell(0);
10
11	var s, e, n, p;
12	p = 0;
13	while(true)
14	{
15		s = sHTML.indexOf('[n',p);
16		if(s<0)break;
17		e = sHTML.indexOf(']',s);
18		if(e<0)break;
19		n = parseInt(sHTML.substr(s+2,e-s));
20		sHTML = sHTML.substr(0, s)+'[n'+(++n)+']'+sHTML.substr(e+1);
21		p=s+1;
22	}
23	p = 0;
24	while(true)
25	{
26		s = sHTML.indexOf('__n',p);
27		if(s<0)break;
28		e = sHTML.indexOf('_',s+2);
29		if(e<0)break;
30		n = parseInt(sHTML.substr(s+3,e-s));
31		sHTML = sHTML.substr(0, s)+'__n'+(++n)+'_'+sHTML.substr(e+1);
32		p=e+1;
33	}
34	p = 0;
35	while(true)
36	{
37		s = sHTML.indexOf('__N',p);
38		if(s<0)break;
39		e = sHTML.indexOf('__',s+2);
40		if(e<0)break;
41		n = parseInt(sHTML.substr(s+3,e-s));
42		sHTML = sHTML.substr(0, s)+'__N'+(++n)+'__'+sHTML.substr(e+2);
43		p=e+2;
44	}
45	p = 0;
46	while(true)
47	{
48		s = sHTML.indexOf('xxn',p);
49		if(s<0)break;
50		e = sHTML.indexOf('xx',s+2);
51		if(e<0)break;
52		n = parseInt(sHTML.substr(s+3,e-s));
53		sHTML = sHTML.substr(0, s)+'xxn'+(++n)+'xx'+sHTML.substr(e+2);
54		p=e+2;
55	}
56	p = 0;
57	while(true)
58	{
59		s = sHTML.indexOf('%5Bn',p);
60		if(s<0)break;
61		e = sHTML.indexOf('%5D',s+3);
62		if(e<0)break;
63		n = parseInt(sHTML.substr(s+4,e-s));
64		sHTML = sHTML.substr(0, s)+'%5Bn'+(++n)+'%5D'+sHTML.substr(e+3);
65		p=e+3;
66	}
67	oCell.innerHTML = sHTML;
68
69	var patt = new RegExp ("<"+"script"+">[^\000]*?<"+"\/"+"script"+">", "ig");
70	var code = sHTML.match(patt);
71	if(code)
72	{
73		for(var i = 0; i < code.length; i++)
74		{
75			if(code[i] != '')
76			{
77				s = code[i].substring(8, code[i].length-9);
78				jsUtils.EvalGlobal(s);
79			}
80		}
81	}
82
83	if (BX && BX.adminPanel)
84	{
85		BX.adminPanel.modifyFormElements(oRow);
86		BX.onCustomEvent('onAdminTabsChange');
87	}
88
89	setTimeout(function() {
90		var r = BX.findChildren(oCell, {tag: /^(input|select|textarea)$/i});
91		if (r && r.length > 0)
92		{
93			for (var i=0,l=r.length;i<l;i++)
94			{
95				if (r[i].form && r[i].form.BXAUTOSAVE)
96					r[i].form.BXAUTOSAVE.RegisterInput(r[i]);
97				else
98					break;
99			}
100		}
101	}, 10);
102}
103
104function SFSetUrlVar(id, el_id)
105{
106	var obj_ta = BX(el_id);
107	//IE
108	if (document.selection)
109	{
110		obj_ta.focus();
111		var sel = document.selection.createRange();
112		sel.text = id;
113		//var range = obj_ta.createTextRange();
114		//range.move('character', caretPos);
115		//range.select();
116	}
117	//FF
118	else if (obj_ta.selectionStart || obj_ta.selectionStart == '0')
119	{
120		var startPos = obj_ta.selectionStart;
121		var endPos = obj_ta.selectionEnd;
122		var caretPos = startPos + id.length;
123		obj_ta.value = obj_ta.value.substring(0, startPos) + id + obj_ta.value.substring(endPos, obj_ta.value.length);
124		obj_ta.setSelectionRange(caretPos, caretPos);
125		obj_ta.focus();
126	}
127	else
128	{
129		obj_ta.value += id;
130		obj_ta.focus();
131	}
132
133	BX.fireEvent(obj_ta, 'change');
134	obj_ta.focus();
135}
136
137function SFEChangeProptocol(link_md5_id)
138{
139	var protocol_ = BX('pro' + link_md5_id).value;	
140	var linkval = BX('link' + link_md5_id).value;
141	linkval = linkval.trim();
142	while (linkval.substr(0, 1) == '/')
143	{
144		linkval = linkval.substr(1);
145	}
146	var linkval_ = linkval.toLowerCase();
147	if (linkval_.substr(0, 8) == 'https://')
148	{
149		BX('link' + link_md5_id).value = linkval.substr(8);
150		BX('full' + link_md5_id).value = protocol_ + linkval.substr(8);
151	}
152	else if (linkval_.substr(0, 7) == 'http://')
153	{
154		BX('link' + link_md5_id).value = linkval.substr(7);
155		BX('full' + link_md5_id).value = protocol_ + linkval.substr(7);
156	}
157	else if (linkval.length > 0)
158	{
159		BX('full' + link_md5_id).value = protocol_ + linkval;
160	}
161	else
162	{
163		BX('full' + link_md5_id).value = '';
164	}
165}
166
167function SFEParseUrl(link_md5_id)
168{
169	var linkval = BX('link' + link_md5_id).value;
170	linkval = linkval.trim();
171	var linkval_ = linkval.toLowerCase();
172	if (linkval_.substr(0, 8) == 'https://')
173	{
174		BX('pro' + link_md5_id).value = 'https://';
175		linkval = linkval.substr(8);
176		while (linkval.substr(0, 1) == '/')
177		{
178			linkval = linkval.substr(1);
179		}
180		BX('link' + link_md5_id).value = linkval;
181		BX('full' + link_md5_id).value = 'https://' + linkval;
182	}
183	else if (linkval_.substr(0, 7) == 'http://')
184	{
185		BX('pro' + link_md5_id).value = 'http://';
186		linkval = linkval.substr(7);
187		while (linkval.substr(0, 1) == '/')
188		{
189			linkval = linkval.substr(1);
190		}
191		BX('link' + link_md5_id).value = linkval;
192		BX('full' + link_md5_id).value = 'http://' + linkval;
193	}
194	else if (linkval_.substr(0, 2) == '//')
195	{
196		BX('pro' + link_md5_id).value = 'http://';
197		while (linkval.substr(0, 1) == '/')
198		{
199			linkval = linkval.substr(1);
200		}
201		BX('link' + link_md5_id).value = linkval;
202		BX('full' + link_md5_id).value = 'http://' + linkval;
203	}
204	else if (linkval_.substr(0, 1) == '/')
205	{
206		BX('pro' + link_md5_id).value = '/';
207		while (linkval.substr(0, 1) == '/')
208		{
209			linkval = linkval.substr(1);
210		}
211		BX('link' + link_md5_id).value = linkval;
212		BX('full' + link_md5_id).value = '/' + linkval;
213	}
214	else if (linkval.length > 0)
215	{
216		BX('full' + link_md5_id).value = BX('pro' + link_md5_id).value + linkval;
217	}
218	else
219	{
220		BX('full' + link_md5_id).value = '';
221	}
222}

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.