PageSourceSearch

https://www.bestfreeplugins.com/js/navigation.js

js bestfreeplugins.com collected 2026-10-09 17:52:51 UTC 8,315 bytes, 211 lines download raw bytes

1document.getElementById('searchPanel').checked=false;
2
3document.getElementsByClassNameArray=function(cl)
4	{
5	var retnode=[];
6	var myclass=new RegExp('\\b'+cl+'\\b');
7	var elem=this.getElementsByTagName('*');
8	for (var i=0;i<elem.length;++i)
9		{
10		var classes=elem[i].className;
11		if (myclass.test(classes)) retnode.push(elem[i]);
12		}
13	return retnode;
14	};
15
16
17
18
19
20function toggleSub(x)
21	{
22	document.getElementById('menuBtn').style.display='block';
23	//document.getElementById('searchBtn').style.display='block';
24	document.getElementById('subABorder').style.display='none';
25	document.getElementById('subBBorder').style.display='none';
26	document.getElementById('subCBorder').style.display='none';
27	var myId=document.getElementById('sub'+x);
28	var myBoxId=document.getElementById('sub'+x+'Box');
29	var myBorderId=document.getElementById('sub'+x+'Border');
30	var myDisplay=myId.style.display;
31	var aSubNav=document.getElementsByClassNameArray('subMultiCol');
32
33	for(var i=0;i<aSubNav.length;++i){aSubNav[i].style.display='none';}
34	if (window.matchMedia("(max-width: 950px)").matches)
35		{
36		var minus=38;if (window.matchMedia("(min-width: 661px)").matches){minus=10;}
37		var centerHeight=document.getElementById('centerPanel').clientHeight-minus;
38		if (centerHeight>40)
39			{
40			document.querySelector('#subA').style.maxHeight=centerHeight+'px';
41			document.querySelector('#subB').style.maxHeight=centerHeight+'px';
42			document.querySelector('#subC').style.maxHeight=centerHeight+'px';
43			}
44		}
45	if (myDisplay=='none'||myDisplay=='')
46		{
47		myBoxId.style.position='relative';
48		if (window.matchMedia("(min-width: 951px)").matches){
49			myId.style.display='table';myBorderId.style.display='table';
50			}
51		else {
52			myId.style.display='table';myBorderId.style.display='table';
53			document.body.scrollTop=document.documentElement.scrollTop=0;
54			}
55		}
56	else {
57		myId.style.display='none';myBorderId.style.display='none';
58		myBoxId.style.position='absolute';
59		}
60
61	//Put ring around open top menu
62	var myClassName=document.getElementById('drop'+x).childNodes[0].className;
63	var aTopLink=document.getElementsByClassNameArray('top_link');
64	for(var i=0;i<aTopLink.length;++i){aTopLink[i].className='top_link ring';}
65	if (myClassName!='top_link ring selected'){document.getElementById('drop'+x).childNodes[0].className='top_link ring selected';}
66	}
67
68
69
70
71
72document.addEventListener("click", function(event) {
73if (window.matchMedia("(min-width: 951px)").matches){
74if (event.target.closest(".subMultiCol")) return;
75if (event.target.closest(".top_link")) return;
76var aSubNav=document.getElementsByClassNameArray('subMultiCol');
77for(var i=0;i<aSubNav.length;++i){aSubNav[i].style.display='none';}
78var aSubBorder=document.getElementsByClassNameArray('subBorder');
79for(var i=0;i<aSubBorder.length;++i){aSubBorder[i].style.display='none';}
80var aTopLink=document.getElementsByClassNameArray('top_link');
81for(var i=0;i<aTopLink.length;++i){aTopLink[i].className='top_link ring';}
82}
83});
84
85
86
87
88
89//Adjust on resizing
90function TableBlockOnResize(){
91var aSubMulti=document.getElementsByClassNameArray('subMultiCol');
92for(var i=0;i<aSubMulti.length;++i)
93	{
94	if (window.matchMedia("(min-width: 951px)").matches && aSubMulti[i].style.display=='block'){aSubMulti[i].style.display='table';}
95	else if (window.matchMedia("(max-width: 950px)").matches && aSubMulti[i].style.display=='table')
96		{
97		var minus=38;if (window.matchMedia("(min-width: 661px)").matches){minus=10;}
98		var centerHeight=document.getElementById('centerPanel').clientHeight-minus;
99		if (centerHeight>40)
100			{
101			document.querySelector('#subA').style.maxHeight=centerHeight+'px';
102			document.querySelector('#subB').style.maxHeight=centerHeight+'px';
103			document.querySelector('#subC').style.maxHeight=centerHeight+'px';
104			}
105		aSubMulti[i].style.display='block';
106		}
107	}
108}
109window.addEventListener('resize',TableBlockOnResize,false);
110var previousOrientation=window.orientation;
111var checkOrientation=function(){
112	if(window.orientation!==previousOrientation)
113		{
114		previousOrientation=window.orientation;
115		TableBlockOnResize();
116		}
117	};
118window.addEventListener("orientationchange",checkOrientation,false);
119
120
121
122
123
124
125//BURGER -->
126
127var prevPos=0;
128function scrollHeader(w){
129	if (window.matchMedia("(max-width: 699px)").matches)
130		{
131		let box=document.getElementById(w).getBoundingClientRect();
132		var nowPos=box.top;
133		if (prevPos<nowPos)
134			{
135			document.getElementById('headerWrap').style.top='0';
136			document.getElementById('menuBox').style.top=0;
137			}
138		else if (prevPos!=0)
139			{
140			var moveUp=-60;
141			if (window.matchMedia("(max-width: 500px)").matches) {moveUp=-54;}
142			document.getElementById('headerWrap').style.top=moveUp+'px';
143			document.getElementById('menuBox').style.top=moveUp+'px';
144			}
145		prevPos=nowPos;
146		}
147	}
148
149function openBurger(){
150	document.getElementById('searchPanel').checked=false;
151	document.body.style.overflowY='hidden';
152	var b1=document.getElementById('b1');var b2=document.getElementById('b2');var b3=document.getElementById('b3');var btn=document.getElementById('menuBtn');
153	var headerWrap=document.getElementById('headerWrap');
154	headerWrap.scrollTop=0;
155	var kontLow,loopKont,nKclass,nLclass,myUrl,noMapClass,bL,myOnclick,myClass;
156	var menuBoxDisplay=document.getElementById('menuBox');
157	var nUlArray=document.getElementsByClassName('nUl');
158	while(nUlArray[0]){nUlArray[0].parentNode.removeChild(nUlArray[0]);}
159	if (menuBoxDisplay.style.display!='block')
160		{
161		if (window.matchMedia("(max-width: 660px)").matches)
162			{
163			document.getElementById('menuSubA').style.display='none';document.getElementById('menuSubB').style.display='none';document.getElementById('menuSubC').style.display='none';
164			document.getElementById('menuLabelA').className='sn_up';document.getElementById('menuLabelB').className='sn_up';document.getElementById('menuLabelC').className='sn_up';
165			}
166		else
167			{
168			document.getElementById('menuSubA').style.display='block';document.getElementById('menuSubB').style.display='block';document.getElementById('menuSubC').style.display='block';
169			document.getElementById('menuLabelA').className='';document.getElementById('menuLabelB').className='';document.getElementById('menuLabelC').className='';
170			}
171		menuBoxDisplay.style.display='block';
172		btn.style.borderColor='#249af4';
173		//if (window.matchMedia("(max-width: 950px)").matches){btn.style.marginRight=42 + 'px';}
174		//else {btn.style.marginRight=34 + 'px';}
175		b1.style.backgroundColor='#249af4';b1.style.left='12px';b1.style.top='11px';b1.style.width='18px';b1.style.transform='rotate(45deg)';
176		b2.style.backgroundColor='transparent';
177		b3.style.backgroundColor='#249af4';b3.style.left='12px';b3.style.top='23px';b3.style.width='18px';b3.style.transform='rotate(-45deg)';
178		document.getElementById('wrapper').style.height='100%';
179		document.getElementById('content').style.display='none';
180		document.getElementById('headerWrap').style.height='0';
181		document.getElementById('headerWrap').style.borderBottomWidth='0';
182		document.getElementById('headerLogo').style.display='none';
183		document.getElementById('footer').style.display='none';
184		document.getElementById('dropline').style.display='none';
185		}
186	else{
187		menuBoxDisplay.style.display='none';
188		document.body.style.overflowY='unset';
189		btn.style.borderColor='#fff';
190		btn.style.marginRight=25 + 'px';
191		b1.style.backgroundColor='#f9f9f9';b1.style.left='8px';b1.style.top='12px';b1.style.width='20px';b1.style.transform='initial';
192		b2.style.backgroundColor='#f9f9f9';
193		b3.style.backgroundColor='#f9f9f9';b3.style.left='8px';b3.style.top='22px';b3.style.width='20px';b3.style.transform='initial';
194		document.getElementById('wrapper').style.height='initial';
195		document.getElementById('content').style.display='flex';
196		document.getElementById('headerWrap').style.height='59px';
197		document.getElementById('headerWrap').style.borderBottomWidth='1px';
198		document.getElementById('headerLogo').style.display='initial';
199		document.getElementById('footer').style.display='block';
200		document.getElementById('dropline').style.display='block';
201		}
202	}
203
204
205
206function toggleMenuSub(what){
207		var menuSub=document.getElementById('menuSub'+what);
208		var menuLabel=document.getElementById('menuLabel'+what);
209		if (menuSub.style.display=='none'){menuSub.style.display='block';menuLabel.className='';}
210		else{menuSub.style.display='none';menuLabel.className='sn_up';}
211		}

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.