1// include menubar core js 2document.addEventListener("DOMContentLoaded", function() { 3 const scripts = [ 4 '/script/menubar.js', 5 ]; 6 function loadScript(src) { 7 return new Promise((resolve, reject) => { 8 const script = document.createElement("script"); 9 script.src = src; 10 script.onload = () => resolve(); 11 script.onerror = () => reject(new Error("error loading " + src)); 12 document.body.appendChild(script); 13 }); 14 } 15 function loadAll(scripts, index = 0) { 16 if (index < scripts.length) { 17 loadScript(scripts[index]).then(() => { 18 loadAll(scripts, index + 1); 19 }).catch(error => { 20 console.error(error); 21 loadAll(scripts, index + 1); 22 }); 23 } 24 } 25 loadAll(scripts); 26}); 27 28// search toggler 29$(function(){ 30 const GL_SEARCH = $(".gl-search-container"); 31 GL_SEARCH.on("click", ".gl-search-action", function(e) { 32 const _parent = $(e.delegateTarget); 33 _parent.addClass("is-active").find(".gl-search-input").focus(); 34 }); 35 $(document).mouseup(function (e){ 36 if(!GL_SEARCH.is(e.target) && GL_SEARCH.has(e.target).length === 0){ 37 GL_SEARCH.removeClass("is-active"); 38 } 39 }); 40});
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.