PageSourceSearch

https://simonlesser.com/js/highlight.js

js simonlesser.com collected 2026-10-04 02:59:52 UTC 763 bytes, 29 lines download raw bytes

1
2function extractPageName(hrefString)
3{
4	var arr = hrefString.split('/');
5	return  (arr.length<2) ? hrefString : arr[arr.length-2].toLowerCase() + arr[arr.length-1].toLowerCase();               
6}
7
8function setActiveMenu(arr, crtPage)
9{
10	for (var i=0; i<arr.length; i++)
11	{
12		if(extractPageName(arr[i].href) == crtPage)
13		{
14			if (arr[i].parentNode.tagName != "DIV")
15			{
16				arr[i].className = "highlight";
17				arr[i].parentNode.className = "highlight";
18			}
19		}
20	}
21}
22
23function setPage()
24{
25	hrefString = document.location.href ? document.location.href : document.location;
26
27	if (document.getElementById("leftmenu")!=null)
28		setActiveMenu(document.getElementById("leftmenu").getElementsByTagName("a"), extractPageName(hrefString));
29}

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.