1class Menu { 2 constructor() { 3 this.side = "left" // can put on left or right 4 this.toggle = false; 5 this.currentCallerName = "" // 'works', etc 6 this.currentPageName // pagename 7 8 $('#menutab').html('Menu') 9 $("#menutab").on("mousedown", (e)=> { // calls changetoggle on click 10 this.retract(true) 11 e.stopPropagation(); 12 }); 13 14 $("#sidebarholder").on("mousedown", (e)=> { e.stopPropagation() }) // calls changetoggle on click 15 } 16 17 fillSubmenu = (caller) => { // uses caller ref 18 19 $('#subs').empty(); 20 21 for (let a = 0; a < caller.allobjects.length; a++) { 22 23 let d = caller.allobjects[a] // gets each obj 24 let sub = select('#subs') 25 26 if (d.Title !== "") { // creates divs 27 var div = createDiv(''); 28 div.parent(sub) 29 div.id(a) 30 div.html(d.Title) // "⢠" + 31 32 var element = document.getElementById(a); 33 element.classList.add("grey", "button"); // 2 classes, button cursor in css 34 35 // This bypasses clickOnCategory to just call getPage 36 $("#" + a).mousedown(() => { // if click on submenu item 37 $('#subs').children().removeClass("black").addClass("grey"); // make all grey 38 $("#" + a).removeClass("grey").addClass("black"); // make this one black 39 40 this.currentCallerName = caller.name 41 this.currentPageName = caller.allobjects[a].Url 42 43 history.pushState(null, null, "/" + caller.name + "/" + caller.allobjects[a].Url) // memory 44 caller.getPage(caller.allobjects[a].Url, 'direct') 45 46 menu.retract() 47 }) 48 } 49 } 50 } 51 52 retract = (change) => { // retract tab if click on background, change is if I click directly on tab 53 if (change) { 54 this.toggle = !this.toggle; 55 } else { 56 this.toggle = false; 57 } 58 59 var w = $('#sidebar').width() 60 61 if (this.toggle) { 62 $("#menutab").css("border-bottom", "0") 63 $('#sidebar').animate({left: "-30px"}, 200, () => {}) 64 $('body').addClass("menu-open") 65 66 } else { 67 $("#menutab").css("border-bottom", "thin solid blue"); 68 $('#sidebar').animate({left: -w }, 200, () => {}) 69 $('body').removeClass("menu-open") 70 } 71 } 72}
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.