File indexing completed on 2025-01-18 09:14:37
0001 document.addEventListener("DOMContentLoaded", function() {
0002
0003
0004 var menu = q(".sectionTOCS")[0];
0005 var menuopened = "^^^";
0006 var m = createEl("a","menu","");
0007 var toolbar = createEl("div","toolbar");
0008 var sidebar = createEl("div","sidebar","");
0009 var crosslinks = q(".crosslinks")[0];
0010 var setText = function(node,a){
0011 var text = document.createTextNode(a);
0012 node.removeChild(node.childNodes[0]);
0013 node.appendChild(text);
0014 }
0015
0016 var transfromCrosslinks = function(newcrosslinks,el){
0017
0018 var links = el.querySelectorAll("a");
0019 var newcrs = {}
0020
0021 for(i=0;i!=links.length;i++){
0022 var text = links[i].firstChild.nodeValue;
0023 newcrs[text] = links[i];
0024 }
0025
0026
0027 var next = newcrs["next"] || createEl("span","blanklink",">")
0028 setText(next,"⇨");
0029 var prev = newcrs["prev"]|| createEl("span","blanklink",">")
0030 setText(prev,"⇦");
0031 setText(newcrs["up"],"⇧");
0032
0033 newcrosslinks.appendChild(prev);
0034 newcrosslinks.appendChild(newcrs["up"]);
0035 newcrosslinks.appendChild(next);
0036 crosslinks.remove();
0037 return newcrosslinks;
0038 }
0039
0040
0041 if(crosslinks){
0042 transfromCrosslinks(toolbar,crosslinks);
0043
0044 if(!menu) sidebar.appendChild(toolbar);
0045
0046 }
0047 if(menu) {
0048 toolbar.appendChild(m);
0049 sidebar.appendChild(toolbar);
0050 sidebar.appendChild(menu);
0051 }
0052 q("body")[0].appendChild(sidebar);
0053
0054 }, false);