1function toggleNav(element){ 2 const parent = element.parentElement; 3 if (parent.className.includes("toggled")){ 4 parent.className = parent.className.replace(/toggled/gm,'') 5 } 6 else{ 7 parent.className += " toggled"; 8 } 9} 10 11{ 12 const root = document.currentScript.src.substring(0,document.currentScript.src.lastIndexOf('/')); 13 const menus = { 14 "Blog":`${root}/blog/index.html`, 15 "Contact Us":`${root}/contact-us/index.html`, 16 "Cameras":`${root}/extended-raw/index.html`, 17 "Support":`https://support.gentlemencoders.com`, 18} 19 20 let html = [ 21 `<header id="masthead" class="site-header stickyHeader" style="background-color:#222222"> 22 <a href="/"><img src="${root}/images/GC_Logo_White_390x120.png" class="custom-logo"></a> 23 <nav id="site-navigation" class="main-navigation" style="text-align:center"> 24 <div class="menu-toggle navbutton" onclick="toggleNav(this)"> 25 <svg width="24px" xmlns="https://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 384.97 384.97"> 26 <path d="M12.03,84.212h360.909c6.641,0,12.03-5.39,12.03-12.03c0-6.641-5.39-12.03-12.03-12.03H12.03 27 C5.39,60.152,0,65.541,0,72.182C0,78.823,5.39,84.212,12.03,84.212z"/> 28 <path d="M372.939,180.455H12.03c-6.641,0-12.03,5.39-12.03,12.03s5.39,12.03,12.03,12.03h360.909c6.641,0,12.03-5.39,12.03-12.03 29 S379.58,180.455,372.939,180.455z"/> 30 <path d="M372.939,300.758H12.03c-6.641,0-12.03,5.39-12.03,12.03c0,6.641,5.39,12.03,12.03,12.03h360.909 31 c6.641,0,12.03-5.39,12.03-12.03C384.97,306.147,379.58,300.758,372.939,300.758z"/> 32 </svg> 33</div> 34 <div class="menu-primary-navigation-container"> 35 <ul id="primary-menu"> 36 `]; 37 for(let menu in menus){ 38 html.push(`<li class="menu-item menu-item-type-post_type menu-item-object-page"><a href="${menus[menu]}">${menu}</a></li>`); 39 } 40 html.push("</ul></div></nav></header>"); 41 42 document.currentScript.outerHTML = html.join(''); 43} 44
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.