1 2 const the_appheader = document.getElementById('appheader'); 3 4 const the_topics_menu = document.getElementById("topics_menu"); 5 const the_magazine_menu = document.getElementById("magazine_menu"); 6 const the_events_menu = document.getElementById("events_menu"); 7 const the_videos_menu = document.getElementById("videos_menu"); 8 const the_resources_menu = document.getElementById("resources_menu"); 9 const the_lists_menu = document.getElementById("lists_menu"); 10 11 const mynewTopDiv = document.createElement('div'); 12 mynewTopDiv.setAttribute('id', 'Top-Accordion-trigger'); 13 mynewTopDiv.setAttribute('style', 'z-index:8'); 14 //mynewTopDiv.setAttribute('onclick', 'toggleitem("mentoptop","Top-")'); 15 mynewTopDiv.setAttribute('onclick', 'toggleOpen("mentoptop",this)'); 16 mynewTopDiv.classList.add('Accordion-trigger'); 17 18 const mynewMagDiv = document.createElement('div'); 19 mynewMagDiv.setAttribute('id', 'Mag-Accordion-trigger'); 20 mynewMagDiv.setAttribute('style', 'z-index:8'); 21 mynewMagDiv.setAttribute('onclick', 'toggleOpen("menmagtop",this)'); 22 mynewMagDiv.classList.add('Accordion-trigger'); 23 24 const mynewEveDiv = document.createElement('div'); 25 mynewEveDiv.setAttribute('id', 'Eve-Accordion-trigger'); 26 mynewEveDiv.setAttribute('style', 'z-index:8'); 27 mynewEveDiv.setAttribute('onclick', 'toggleOpen("menevetop",this)'); 28 mynewEveDiv.classList.add('Accordion-trigger'); 29 30 const mynewResDiv = document.createElement('div'); 31 mynewResDiv.setAttribute('id', 'Res-Accordion-trigger'); 32 mynewResDiv.setAttribute('style', 'z-index:8'); 33 mynewResDiv.setAttribute('onclick', 'toggleOpen("menrestop",this)'); 34 mynewResDiv.classList.add('Accordion-trigger'); 35 36 const mynewLisDiv = document.createElement('div'); 37 mynewLisDiv.setAttribute('id', 'Lis-Accordion-trigger'); 38 mynewLisDiv.setAttribute('style', 'z-index:8'); 39 mynewLisDiv.setAttribute('onclick', 'toggleOpen("menlistop",this)'); 40 mynewLisDiv.classList.add('Accordion-trigger'); 41 42 var themobilelisttogglestate='closed'; 43 44 function doMobileMenuButtonCheck(){ 45 const the_mobilemenubutton = document.getElementById('mobilemenubuttondiv'); 46 const the_appheader = document.getElementById('appheader'); 47 const the_topics_menu = document.getElementById("topics_menu"); 48 const the_magazine_menu = document.getElementById("magazine_menu"); 49 const the_events_menu = document.getElementById("events_menu"); 50 const the_videos_menu = document.getElementById("videos_menu"); 51 const the_resources_menu = document.getElementById("resources_menu"); 52 const the_lists_menu = document.getElementById("lists_menu"); 53 if (the_mobilemenubutton) the_mobilemenubutton.addEventListener('click', function() { 54 if (the_appheader) the_appheader.classList.add('is-open'); 55 if (the_topics_menu) the_topics_menu.classList.remove('Dropdown-trigger'); 56 if (the_magazine_menu) the_magazine_menu.classList.remove('Dropdown-trigger'); 57 if (the_events_menu) the_events_menu.classList.remove('Dropdown-trigger'); 58 if (the_videos_menu) the_videos_menu.classList.remove('Dropdown-trigger'); 59 if (the_resources_menu) the_resources_menu.classList.remove('Dropdown-trigger'); 60 if (the_lists_menu) the_lists_menu.classList.remove('Dropdown-trigger'); 61 setupmobilemenu(); 62 }); 63 64 const the_mobilemenubuttonclose = document.getElementById('App-header__cloak'); 65 if (the_mobilemenubuttonclose) the_mobilemenubuttonclose.addEventListener('click', function() { 66 if (the_appheader) the_appheader.classList.remove('is-open'); 67 if (the_topics_menu) the_topics_menu.classList.add('Dropdown-trigger'); 68 if (the_magazine_menu) the_magazine_menu.classList.add('Dropdown-trigger'); 69 if (the_events_menu) the_events_menu.classList.add('Dropdown-trigger'); 70 if (the_videos_menu) the_videos_menu.classList.add('Dropdown-trigger'); 71 if (the_resources_menu) the_resources_menu.classList.add('Dropdown-trigger'); 72 if (the_lists_menu) the_lists_menu.classList.add('Dropdown-trigger'); 73 if (the_topics_menu) toggleCLoseitem('mentoptop'); 74 if (the_magazine_menu) toggleCLoseitem('menmagtop'); 75 if (the_events_menu) toggleCLoseitem('menevetop'); 76 if (the_resources_menu) toggleCLoseitem('menrestop'); 77 if (the_lists_menu) toggleCLoseitem('menlistop'); 78 mynewTopDiv.remove(); 79 mynewMagDiv.remove(); 80 mynewEveDiv.remove(); 81 mynewResDiv.remove(); 82 mynewLisDiv.remove(); 83 dovishov(); 84 }); 85 86 } 87 88 function dovishov(){ 89 90 const the_topics_menu = document.getElementById("topics_menu"); 91 const the_magazine_menu = document.getElementById("magazine_menu"); 92 const the_events_menu = document.getElementById("events_menu"); 93 const the_videos_menu = document.getElementById("videos_menu"); 94 const the_resources_menu = document.getElementById("resources_menu"); 95 const the_lists_menu = document.getElementById("lists_menu"); 96 97 if (the_topics_menu) the_topics_menu.addEventListener("mouseover", the_topics_menu.topvisfn=function to
97pvisfn() { 98 this.classList.add("is-hovering");this.classList.add("is-visible"); 99 }); 100 101 if (the_magazine_menu) the_magazine_menu.addEventListener("mouseover", the_magazine_menu.magvisfn=function magvisfn() { 102 this.classList.add("is-hovering");this.classList.add("is-visible"); 103 }); 104 105 if (the_events_menu) the_events_menu.addEventListener("mouseover", the_events_menu.evevisfn=function evevisfn() { 106 this.classList.add("is-hovering");this.classList.add("is-visible"); 107 }); 108 109 if (the_resources_menu) the_resources_menu.addEventListener("mouseover", the_resources_menu.resvisfn=function resvisfn() { 110 this.classList.add("is-hovering");this.classList.add("is-visible"); 111 }); 112 113 if (the_lists_menu) the_lists_menu.addEventListener("mouseover", the_lists_menu.listvisfn=function lisvisfn() { 114 this.classList.add("is-hovering");this.classList.add("is-visible"); 115 }); 116 117 if (the_topics_menu) the_topics_menu.addEventListener("mouseout", function() { 118 this.classList.remove("is-hovering");this.classList.remove("is-visible"); 119 }); 120 121 if (the_magazine_menu) the_magazine_menu.addEventListener("mouseout", function() { 122 this.classList.remove("is-hovering");this.classList.remove("is-visible"); 123 }); 124 125 if (the_events_menu) the_events_menu.addEventListener("mouseout", function() { 126 this.classList.remove("is-hovering");this.classList.remove("is-visible"); 127 }); 128 129 if (the_videos_menu) the_videos_menu.addEventListener("mouseover", function() { 130 this.classList.add("is-hovering");this.classList.add("is-visible"); 131 }); 132 133 if (the_videos_menu) the_videos_menu.addEventListener("mouseout", function() { 134 this.classList.remove("is-hovering");this.classList.remove("is-visible"); 135 }); 136 137 if (the_resources_menu) the_resources_menu.addEventListener("mouseout", function() { 138 this.classList.remove("is-hovering");this.classList.remove("is-visible"); 139 }); 140 141 if (the_lists_menu) the_lists_menu.addEventListener("mouseout", function() { 142 this.classList.remove("is-hovering");this.classList.remove("is-visible"); 143 }); 144 145 return; 146 } 147 148 149 function domymobilelisttoggle(whatmenuitem,whatstate){ 150 mymenuitemtouse=whatmenuitem+'Accordion-trigger'; 151 const mysvgcontainer = document.getElementById(mymenuitemtouse); 152 const mymobileitemclosed='<svg class="icon" fill="#000000" width="12px" height="12px" viewBox="0 0 1024 1024"><path d="M596.6 512v0 0l-334.4-348.2c-8.4-8.6-8.2-22.8 0.4-31.6l59.8-61.2c8.6-8.8 22.6-9 31-0.4l408.4 425.4c4.4 4.4 6.4 10.4 6 16.2 0.2 6-1.8 11.8-6 16.2l-408.4 425.2c-8.4 8.6-22.4 8.4-31-0.4l-59.8-61.2c-8.6-8.8-8.8-23-0.4-31.6l334.4-348.4z"></path></svg>'; 153 const mymobileitemopen='<svg class="icon" fill="#000000" width="12px" height="12px" viewBox="0 0 1024 1024"><path d="M512 596.6v0 0l348.4-334.4c8.6-8.4 22.8-8.2 31.6 0.4l61.2 59.8c8.8 8.6 9 22.6 0.4 31l-425.4 408.4c-4.4 4.4-10.4 6.4-16.2 6-6 0.2-11.8-1.8-16.2-6l-425.4-408.4c-8.6-8.4-8.4-22.4 0.4-31l61.2-59.8c8.8-8.6 23-8.8 31.6-0.4l348.4 334.4z"></path></svg>'; 154 if (whatstate=='open'){ 155 mysvgcontainer.innerHTML = mymobileitemopen; 156 } 157 if (whatstate=='closed'){ 158 mysvgcontainer.innerHTML = mymobileitemclosed; 159 } 160 } 161 162 function domymobilelisttoggleoff(whatmenuitem,whatstate){ 163 mymenuitemtouse=whatmenuitem+'Accordion-trigger'; 164 const mysvgcontainer = document.getElementById(mymenuitemtouse); 165 const mymobileitemclosed='<svg class="icon" fill="#000000" width="12px" height="12px" viewBox="0 0 1024 1024"><path d="M596.6 512v0 0l-334.4-348.2c-8.4-8.6-8.2-22.8 0.4-31.6l59.8-61.2c8.6-8.8 22.6-9 31-0.4l408.4 425.4c4.4 4.4 6.4 10.4 6 16.2 0.2 6-1.8 11.8-6 16.2l-408.4 425.2c-8.4 8.6-22.4 8.4-31-0.4l-59.8-61.2c-8.6-8.8-8.8-23-0.4-31.6l334.4-348.4z"></path></svg>'; 166 const mymobileitemopen='<svg class="icon" fill="#000000" width="12px" height="12px" viewBox="0 0 1024 1024"><path d="M512 596.6v0 0l348.4-334.4c8.6-8.4 22.8-8.2 31.6 0.4l61.2 59.8c8.8 8.6 9 22.6 0.4 31l-425.4 408.4c-4.4 4.4-10.4 6.4-16.2 6-6 0.2-11.8-1.8-16.2-6l-425.4-408.4c-8.6-8.4-8.4-22.4 0.4-31l61.2-59.8c8.8-8.6 23-8.8 31.6-0.4l348.4 334.4z"></path></svg>'; 167 if (whatstate=='open'){ 168 mysvgcontainer.innerHTML = mymobileitemopen; 169 } 170 if (whatstate=='closed'){ 171 mysvgcontainer.innerHTML = mymobileitemclosed; 172 } 173 } 174 175 function toggleitem(myitem){ 176 wheretomod=document.getElementById(myitem); 177 mykid=wheretomod.firstElementChild; 178 wheretomod.classList.replace('Dropdown','Accordion'); 179 mykid.classList.replace('Dropdown-list','Accordion-list'); 180 mykid.classList.add('is-visible'); 181 return; 182 } 183 184 function toggleCLoseitem(myitem){ 185 wheretomod=document.getElementById(myitem); 186 mykid=wheretomod.firstElementChild; 187 wheretomod.classList.replace('Accordion','Dropdown'); 188 mykid.classList.replace('Accordion-list','Dropdown-list'); 189 mykid.classList.remove('is-visible'); 190 return; 191 } 192 193 194 function toggleOpen(myitem,whatitem){ 195 wheretomod=document.getElementById(myitem); 196 mykid=wheretomod.firstElementChild; 197 wheretomod.classList.replace('Dropdown','Accordion'); 198 mykid.classList.replace('Dropdown-list','Accordion-list'); 199 mykid.classList.add('is-visible'); 200 whatitem.setAttribute( "onclick", "toggleClosed('"+myitem+"',this);" ); 201 const mymobileitemopen='<svg class="icon" fill="#000000" width="12px" height="12px" viewBox="0 0 1024 1024"><path d="M512 596.6v0 0l348.4-334.4c8.6-8.4 22.8-8.2 31.6 0.4l61.2 59.8c8.8 8.6 9 22.6 0.4 31l-425.4 408.4c-4.4 4.4-10.4 6.4-16.2 6-6 0.2-11.8-1.8-16.2-6l-425.4-408.4c-8.6-8.4-8.4-22.4 0.4-31l61.2-59.8c8.8-8.6 23-8.8 31.6-0.4l348.4 334.4z"></path></svg>'; 202 whatitem.innerHTML = mymobileitemopen; 203 return; 204 } 205 206 function toggleClosed(myitem,whatitem){ 207 wheretomod=document.getElementById(myitem); 208 mykid=wheretomod.firstElementChild; 209 wheretomod.classList.replace('Accordion','Dropdown'); 210 mykid.classList.replace('Accordion-list','Dropdown-list'); 211 mykid.classList.remove('is-visible'); 212 whatitem.setAttribute( "onclick", "toggleOpen('"+myitem+"',this);" ); 213 const mymobileitemclosed='<svg class="icon" fill="#000000" width="12px" height="12px" viewBox="0 0 1024 1024"><path d="M596.6 512v0 0l-334.4-348.2c-8.4-8.6-8.2-22.8 0.4-31.6l59.8-61.2c8.6-8.8 22.6-9 31-0.4l408.4 425.4c4.4 4.4 6.4 10.4 6 16.2 0.2 6-1.8 11.8-6 16.2l-408.4 425.2c-8.4 8.6-22.4 8.4-31-0.4l-59.8-61.2c-8.6-8.8-8.8-23-0.4-31.6l334.4-348.4z"></path></svg>'; 214 whatitem.innerHTML = mymobileitemclosed; 215 return; 216 } 217 218 function domymenustuff(){ 219 if (the_topics_menu) the_topics_menu.insertBefore(mynewTopDiv, the_topics_menu.firstChild); 220 if (the_magazine_menu) the_magazine_menu.insertBefore(mynewMagDiv, the_magazine_menu.firstChild); 221 if (the_events_menu) the_events_menu.insertBefore(mynewEveDiv, the_events_menu.firstChild); 222 if (the_resources_menu) the_resources_menu.insertBefore(mynewResDiv, the_resources_menu.firstChild); 223 if (the_lists_menu) the_lists_menu.insertBefore(mynewLisDiv, the_lists_menu.firstChild); 224 if (the_topics_menu) the_topics_menu.removeEventListener('mouseover',the_topics_menu.topvisfn, false); 225 if (the_magazine_menu) the_magazine_menu.removeEventListener('mouseover',the_magazine_menu.magvisfn, false); 226 if (the_events_menu) the_events_menu.removeEventListener('mouseover',the_events_menu.evevisfn, false); 227 if (the_resources_menu) the_resources_menu.removeEventListener('mouseover',the_resources_menu.resvisfn, false); 228 if (the_lists_menu) the_lists_menu.removeEventListener('mouseover',the_lists_menu.lisvisfn, false); 229 if (the_topics_menu) domymobilelisttoggleoff('Top-','closed'); 230 if (the_magazine_menu) domymobilelisttoggleoff('Mag-','closed'); 231 if (the_events_menu) domymobilelisttoggleoff('Eve-','closed'); 232 if (the_resources_menu) domymobilelisttoggleoff('Res-','closed'); 233 if (the_lists_menu) domymobilelisttoggleoff('Lis-','closed'); 234 } 235 236 function doMobileMenuToggle(from,to){ 237 const elements = document.getElementsByClassName(from); 238 for (let i = 0; i < elements.length; i++) { 239 const element = elements[i]; 240 element.classList.replace(from, to); 241 } 242 } 243 244 function setupmobilemenu(){ 245 246 var themobilelisttogglestate='closed'; 247 const the_appheader = document.getElementById('appheader'); 248 const the_mobilemenubutton = document.getElementById('mobilemenubuttondiv');
249 const the_topics_menu = document.getElementById("topics_menu"); 250 const the_magazine_menu = document.getElementById("magazine_menu"); 251 const the_events_menu = document.getElementById("events_menu"); 252 const the_videos_menu = document.getElementById("videos_menu"); 253 const the_resources_menu = document.getElementById("resources_menu"); 254 const the_lists_menu = document.getElementById("lists_menu"); 255 256 if (the_topics_menu) the_topics_menu.insertBefore(mynewTopDiv, the_topics_menu.firstChild); 257 if (the_magazine_menu) the_magazine_menu.insertBefore(mynewMagDiv, the_magazine_menu.firstChild); 258 if (the_events_menu) the_events_menu.insertBefore(mynewEveDiv, the_events_menu.firstChild); 259 if (the_resources_menu) the_resources_menu.insertBefore(mynewResDiv, the_resources_menu.firstChild); 260 if (the_lists_menu) the_lists_menu.insertBefore(mynewLisDiv, the_lists_menu.firstChild); 261 if (the_topics_menu) the_topics_menu.removeEventListener('mouseover',the_topics_menu.topvisfn, false); 262 if (the_magazine_menu) the_magazine_menu.removeEventListener('mouseover',the_magazine_menu.magvisfn, false); 263 if (the_events_menu) the_events_menu.removeEventListener('mouseover',the_events_menu.evevisfn, false); 264 if (the_resources_menu) the_resources_menu.removeEventListener('mouseover',the_resources_menu.resvisfn, false); 265 if (the_lists_menu) the_lists_menu.removeEventListener('mouseover',the_lists_menu.lisvisfn, false); 266 if (the_topics_menu) domymobilelisttoggleoff('Top-','closed'); 267 if (the_magazine_menu) domymobilelisttoggleoff('Mag-','closed'); 268 if (the_events_menu) domymobilelisttoggleoff('Eve-','closed'); 269 if (the_resources_menu) domymobilelisttoggleoff('Res-','closed'); 270 if (the_lists_menu) domymobilelisttoggleoff('Lis-','closed'); 271 272 return; 273 274 } 275 276 277 function undomobilemenu(){ 278 279 const the_appheader = document.getElementById('appheader'); 280 const the_topics_menu = document.getElementById("topics_menu"); 281 const the_magazine_menu = document.getElementById("magazine_menu"); 282 const the_events_menu = document.getElementById("events_menu"); 283 const the_videos_menu = document.getElementById("videos_menu"); 284 const the_resources_menu = document.getElementById("resources_menu"); 285 const the_lists_menu = document.getElementById("lists_menu"); 286 287 if (the_appheader) the_appheader.classList.remove('is-open'); 288 if (the_topics_menu) the_topics_menu.classList.add('Dropdown-trigger'); 289 if (the_magazine_menu) the_magazine_menu.classList.add('Dropdown-trigger'); 290 if (the_events_menu) the_events_menu.classList.add('Dropdown-trigger'); 291 if (the_videos_menu) the_videos_menu.classList.add('Dropdown-trigger'); 292 if (the_resources_menu) the_resources_menu.classList.add('Dropdown-trigger'); 293 if (the_lists_menu) the_lists_menu.classList.add('Dropdown-trigger'); 294 if (the_topics_menu) toggleCLoseitem('mentoptop'); 295 if (the_magazine_menu) toggleCLoseitem('menmagtop'); 296 if (the_events_menu) toggleCLoseitem('menevetop'); 297 if (the_resources_menu) toggleCLoseitem('menrestop'); 298 if (the_lists_menu) toggleCLoseitem('menlistop'); 299 mynewTopDiv.remove(); 300 mynewMagDiv.remove(); 301 mynewEveDiv.remove(); 302 mynewResDiv.remove(); 303 mynewLisDiv.remove(); 304 dovishov(); 305 return; 306 } 307 308 function doMobileResizeCheck(){ 309 let resizeTimer; 310 window.addEventListener('resize', function(event) { 311 clearTimeout(resizeTimer); 312 resizeTimer = setTimeout(() => { 313 if (window.matchMedia("(max-width: 900px)").matches) { 314 setupmobilemenu(); 315 } else { 316 undomobilemenu(); 317 } 318 }, 200); // Delay in milliseconds 319 }); 320 } 321 322 function setUpMenu(){ 323 //doMyMeWho(); 324 dovishov(); 325 doMobileResizeCheck(); 326 doMobileMenuButtonCheck(); 327 if (window.matchMedia("(max-width: 900px)").matches) { 328 setupmobilemenu(); 329 } else { 330 //undomobilemenu(); 331 //dovishov(); 332 /* the viewport is more than 900 pixels wide */ 333 } 334 doMyMeWho(); 335 } 336 337 338 function clearmygate(){ 339 mylogingatecheck=document.getElementById('gatecheck'); 340 if (mylogingatecheck){ 341 document.getElementById('gatecheck').innerHTML='';
342 } 343 } 344 345 function domygatecheck(){ 346 if (typeof mygate !== "undefined"){ 347 mylogingate=document.getElementById('loginGate'); 348 if (mylogingate){ 349 document.getElementById('loginGate').outerHTML=atob(mygate); 350 } 351 clearmygate() 352 } 353 } 354 355 function setmyme(themyme){ 356 if ((themyme)!=undefined){ 357 var expires = "expires=0"; 358 document.cookie = 'myme' + "=" + btoa(themyme)+ ";" + expires + ";path=/"; 359 } 360 } 361 362 363 364 function doMyMeWho(){ 365 366 if (localStorage.getItem(atob('U0VMTElOR19QT1dFUl9TVEFURQ=='))) { 367 const value = localStorage.getItem(atob('U0VMTElOR19QT1dFUl9TVEFURQ==')); 368 myme=''; 369 mywho=null; 370 let myArray = []; 371 if (value!=undefined) { 372 myArray = JSON.parse(value); 373 mywho=myArray[atob('dG9rZW4=')]; 374 if (mywho!=null){ 375 myme=myArray[atob('dXNlcg==')][atob('Zmlyc3RuYW1l')]; 376 if ((myme)!=undefined){ 377 const myelement = document.getElementById('loginbutton'); 378 379 if (myelement!=null){ 380 if (myelement.href.indexOf('/profile/')!=-1){ 381 domygatecheck(); 382 } else { 383 myelement.classList.add('fade-out'); 384 let currentlymywidth=myelement.clientWidth; 385 myelement.style.minWidth = currentlymywidth+2+'px'; 386 setTimeout(() => { 387 myelement.style.textAlign='center'; 388 myelement.classList.add('fade-in'); 389 //if (myelement) myelement.innerText = myme; 390 if (myelement) myelement.innerText = 'Profile'; 391 //window.alert(myelement.Width) 392 if (myelement) myelement.href= '/profile/'; 393 myelement.classList.remove('fade-out'); 394 395 }, 1000); 396 setmyme(myme); 397 domygatecheck(); 398 } 399 } 400 } 401 402 } else { 403 404 } 405 } 406 } else { 407 } 408 clearmygate(); 409 } 410 411 412 document.onreadystatechange = function() { 413 //if (document.readyState === "interactive") { 414 if (document.readyState === "complete") { 415 setTimeout(() => { 416 setUpMenu(); 417 //doPageAdCheck(); 418 }, 700); 419 } 420 };
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.