This file is indexed.

/usr/share/gap/doc/tut/toggless.js is in gap-doc 4r6p5-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/* toggless.js                                      Frank Lübeck   */

/* this file contains two functions:
   mergeSideTOCHooks:  this changes div.ContSect elements to the class
                       ContSectClosed and includes a hook to toggle between
                       ContSectClosed and ContSectOpen. 
   openclosetoc:       this function does the toggling, the rest is done by
                       CSS
*/



closedTOCMarker = "▶ ";
openTOCMarker = "▼ ";
noTOCMarker = "  ";
/* merge hooks into side toc for opening/closing subsections
   with openclosetoc   */
function mergeSideTOCHooks() {
  var hlist = document.getElementsByTagName("div");
  for (var i = 0; i < hlist.length; i++) {
     if (hlist[i].className == "ContSect") {
       var chlds = hlist[i].childNodes;
       var el = document.createElement("span");
       var oncl = document.createAttribute("class");
       oncl.nodeValue = "toctoggle";
       el.setAttributeNode(oncl);
       var cont;
       if (chlds.length > 2) {
         var oncl = document.createAttribute("onclick");
         oncl.nodeValue = "openclosetoc(event)";
         el.setAttributeNode(oncl);
         cont = document.createTextNode(closedTOCMarker);
       } else {
         cont = document.createTextNode(noTOCMarker);
       }
       el.appendChild(cont);
       hlist[i].firstChild.insertBefore(el, hlist[i].firstChild.firstChild);
       hlist[i].className = "ContSectClosed";
     }
  }
}

function openclosetoc (event) {
  /* first two steps to make it work in most browsers */
  var evt=window.event || event;
  if (!evt.target) 
    evt.target=evt.srcElement;

  var markClosed = document.createTextNode(closedTOCMarker);
  var markOpen = document.createTextNode(openTOCMarker);

  var par = evt.target.parentNode.parentNode;
  if (par.className == "ContSectOpen") {
    par.className = "ContSectClosed";
    evt.target.replaceChild(markClosed, evt.target.firstChild);
  }
  else if (par.className == "ContSectClosed") {
    par.className = "ContSectOpen";
    evt.target.replaceChild(markOpen, evt.target.firstChild);
  }
}

/* adjust jscontent which is called onload */
jscontentfuncs.push(mergeSideTOCHooks);