1const navHamburger = document.getElementById("nav-toggle"); 2const fullScreenNav = document.getElementById("full-screen-nav"); 3const fullScreenMoreNav = document.getElementById("full-screen-more-nav"); 4const teamSubheadingMenuItems = document.querySelectorAll(".team-page .subheading-menu-item"); 5const newsSubheadingMenuItems = document.querySelectorAll(".news-page .subheading-menu-item"); 6const body = document.body; 7const html = document.querySelector('html'); 8const moreLink = document.getElementById("full-screen-nav--link-more"); 9const sponsorsLink = document.getElementById("full-screen-nav--link-sponsors"); 10const fansLink = document.getElementById("full-screen-nav--link-fans"); 11const ticketsMoreLink = document.getElementById("full-screen-nav--more-link-tickets"); 12const communityMoreLink = document.getElementById("full-screen-nav--link-community"); 13const academyMoreLink = document.getElementById("full-screen-nav--link-academy"); 14const sponsorsSlideOutLinks = document.querySelector(".slide-out-sponsors-links"); 15const fansSlideOutLinks = document.querySelector(".slide-out-fans-links"); 16const ticketsSlideOutLinks = document.querySelector(".slide-out-tickets-links"); 17const communitySlideOutLinks = document.querySelector(".slide-out-community-links"); 18const academySlideOutLinks = document.querySelector(".slide-out-academy-links"); 19const fixturesSlideOutLinks = document.querySelector(".slide-out-fixtures-links"); 20 21// ACTIVE LINK GETS AN UNDERLINE 22// Add click event listener to each subheadingMenuItem on team page 23teamSubheadingMenuItems.forEach(subheadingMenuItem => { 24 subheadingMenuItem.addEventListener('click', () => { 25 // Remove "active" class from all subheadingMenuItems 26 teamSubheadingMenuItems,subheadingMenuItems.forEach(item => { 27 item.classList.remove("active"); 28 }); 29 30 // Add "active" class to the clicked subheadingMenuItem 31 subheadingMenuItem.classList.add("active"); 32 }); 33}); 34// Add click event listener to each subheadingMenuItem on main news page 35newsSubheadingMenuItems.forEach(subheadingMenuItem => { 36 subheadingMenuItem.addEventListener('click', () => { 37 // Remove "active" class from all subheadingMenuItems 38 newsSubheadingMenuItems.forEach(item => { 39 item.classList.remove("active"); 40 }); 41 42 // Add "active" class to the clicked subheadingMenuItem 43 subheadingMenuItem.classList.add("active"); 44 }); 45}); 46 47// TOGGLE THE FULL PAGE NAV MENU 48navHamburger.addEventListener("click", toggleNav); 49moreLink.addEventListener("click", toggleMoreNav); 50 51function toggleNav() { 52 fullScreenNav.classList.toggle('hidden'); 53 // nav-open class stops background scrolling when nav is open 54 body.classList.toggle("nav-open"); 55 html.classList.toggle("nav-open"); 56 if (body.classList.contains("nav-open")) { 57 // window.scrollTo(0, 0); 58 document.querySelector('html').style.overflowY = "hidden"; 59 document.querySelector('body').style.overflowY = "hidden"; 60 } else { 61 document.querySelector('html').style.overflowY = "visible"; 62 document.querySelector('body').style.overflowY = "visible"; 63 } 64} 65 66 67function toggleMoreNav() { 68 fullScreenMoreNav.classList.toggle('hidden'); 69 // nav-open class stops background scrolling when nav is open 70 if (body.classList.contains("nav-open")) { 71 // window.scrollTo(0, 0); 72 document.querySelector('html').style.overflowY = "hidden"; 73 document.querySelector('body').style.overflowY = "hidden"; 74 } else { 75 document.querySelector('html').style.overflowY = "visible"; 76 document.querySelector('body').style.overflowY = "visible"; 77 } 78} 79function closeAllNavs() { 80 fullScreenMoreNav.classList.toggle('hidden'); 81 fullScreenNav.classList.toggle('hidden'); 82 // nav-open class stops background scrolling when nav is open 83 body.classList.remove("nav-open"); 84 html.classList.remove("nav-open"); 85 if (body.classList.contains("nav-open")) { 86 // window.scrollTo(0, 0); 87 document.querySelector('html').style.overflowY = "hidden"; 88 document.querySelector('body').style.overflowY = "hidden"; 89 } else { 90 document.querySelector('html').style.overflowY = "visible"; 91 document.querySelector('body').style.overflowY = "visible"; 92 } 93} 94 95 96// CAROUSEL ON THE HOME PAGE 97if (document.querySelector('.carousel')) { 98 var slider = document.querySelector('.carousel'); 99} 100if (document.querySelectorAll('.carousel--slide')){ 101 var slides = document.querySelectorAll('.carousel--slide'); 102} 103if (document.querySelector('.carousel--slide-change-button')) { 104 105 var nextBtn = document.querySelector('.carousel--slide-change-button'); 106} 107if (slider) { 108 var slideIndex = 0; 109 var touchStartX = 0; 110 var touchEndX = 0; 111 var isAutoSlideEnabled = window.innerWidth > 786;
111 // Check screen width 112 var isCarouselHovered = false; 113 var autoSlideInterval; 114 115 // display the first slide 116 showSlide(slideIndex); 117 118 // go back to the first slide if you are on the last slide 119 function showSlide(index) { 120 if (index < 0) { 121 slideIndex = slides.length - 1; 122 } else if (index >= slides.length) { 123 slideIndex = 0; 124 } 125 slider.style.transform = 'translateX(-' + slideIndex * 100 + '%)'; 126 } 127 128 function changeSlide(n) { 129 slideIndex += n; 130 showSlide(slideIndex); 131 clearInterval(autoSlide); 132 } 133 134 // change slide every set seconds specified in startAutoSlide 135 function autoSlide() { 136 if (isAutoSlideEnabled && !isCarouselHovered) { 137 slideIndex++; 138 showSlide(slideIndex); 139 } 140 } 141 142 function startAutoSlide() { 143 autoSlideInterval = setInterval(autoSlide, 6000); 144 } 145 146 // stops the interval if slide is changed with the slider 147 function stopAutoSlide() { 148 clearInterval(autoSlideInterval); 149 } 150 151 function handleTouchStart(e) { 152 touchStartX = e.touches[0].clientX; 153 } 154 155 function handleTouchEnd(e) { 156 touchEndX = e.changedTouches[0].clientX; 157 handleSwipe(); 158 } 159 160 function handleSwipe() { 161 var swipeThreshold = 100; // Adjust as needed 162 if (touchEndX - touchStartX > swipeThreshold) { 163 changeSlide(-1); // Swipe right 164 } else if (touchStartX - touchEndX > swipeThreshold) { 165 changeSlide(1); // Swipe left 166 } 167 } 168 169 function handleCarouselHover() { 170 isCarouselHovered = !isCarouselHovered; 171 } 172 173 slider.addEventListener('touchstart', handleTouchStart, false); 174 slider.addEventListener('touchend', handleTouchEnd, false); 175 slider.addEventListener('mouseenter', handleCarouselHover, false); 176 slider.addEventListener('mouseleave', handleCarouselHover, false); 177 nextBtn.addEventListener('click', function() { 178 stopAutoSlide(); 179 startAutoSlide(); 180 }); 181 182 // Start the autoSlide interval initially 183 startAutoSlide(); 184} 185 186// PHOTO GALLERY MODAL IMAGES ON INDIVIDUAL PLAYER PAGE 187 188 189 190if (document.querySelector('.gallery-modal')) { 191 var gallery = document.querySelector('.gallery-modal'); 192} 193if (document.querySelector('.gallery-modal-container')) { 194 var galleryContainer = document.querySelector('.gallery-modal-container'); 195} 196if (document.querySelectorAll('.gallery-modal-slide')){ 197 var gallerySlides = document.querySelectorAll('.gallery-modal-slide'); 198} 199if (document.querySelector('.gallery-slide-next')) { 200 var galleryNextBtn = document.querySelector('.gallery-slide-next'); 201} 202if (document.querySelector('.gallery-slide-prev')) { 203 var galleryPrevBtn = document.querySelector('.gallery-slide-prev'); 204} 205if (gallery) { 206 var galleryIndex = 0; 207 var galleryTouchStartX = 0; 208 var galleryTouchEndX = 0; 209 210 function openGalleryModal() { 211 galleryContainer.style.display = "flex"; 212 body.classList.add("gallery-open"); 213 html.classList.add("gallery-open"); 214 document.querySelector('html').style.overflowY = "hidden"; 215 document.querySelector('body').style.overflowY = "hidden"; 216 217 } 218 219 function closeGallery() { 220 galleryContainer.style.display = "none"; 221 body.classList.remove("gallery-open"); 222 html.classList.remove("gallery-open"); 223 document.querySelector('html').style.overflowY = "visible"; 224 document.querySelector('body').style.overflowY = "visible"; 225 } 226 // display the first slide 227 showGallerySlide(galleryIndex); 228 229 // go back to the first slide if you are on the last slide 230 function showGallerySlide(index) { 231 if (index < 0) { 232 galleryIndex = gallerySlides.length - 1; 233 } else if (index >= gallerySlides.length) { 234 galleryIndex = 0; 235 } 236 gallery.style.transform = 'translateX(-' + galleryIndex * 100 + '%)'; 237 } 238 239 function changeGallerySlide(n) { 240 galleryIndex += n; 241 showGallerySlide(galleryIndex); 242 } 243 244 function handleGalleryTouchStart(e) { 245 galleryTouchStartX = e.touches[0].clientX; 246 } 247 248 function handleGalleryTouchEnd(e) { 249 galleryTouchEndX = e.changedTouches[0].clientX; 250 handleGallerySwipe(); 251 } 252 253 function handleGallerySwipe() { 254 var swipeThreshold = 100; // Adjust as needed 255 if (galleryTouchEndX - galleryTouchStartX > swipeThreshold) { 256 changeGallerySlide(-1); // Swipe right 257 } else if (galleryTouchStartX - galleryTouchEndX > swipeThreshold) { 258 changeGallerySlide(1); // Swipe left 259 } 260 } 261 262
263 gallery.addEventListener('touchstart', handleGalleryTouchStart, false); 264 gallery.addEventListener('touchend', handleGalleryTouchEnd, false); 265 266 267} 268 269 270 271 272 273// SCROLL THE NEWS SCROLLER USING THE MOUSE WHEEL 274// const scrollMenu = document.querySelector('.scrollmenu--news'); 275// if (scrollMenu) { 276 277// let isHovered = false; 278 279// scrollMenu.addEventListener('mouseover', () => { 280// isHovered = true; 281// }); 282 283// scrollMenu.addEventListener('mouseout', () => { 284// isHovered = false; 285// }); 286 287// scrollMenu.addEventListener('wheel', (event) => { 288// if (isHovered) { 289// event.preventDefault(); 290// scrollMenu.scrollLeft += event.deltaY; 291// } 292// }); 293// } 294 295// TOGGLE FIXTURES FILTER ON THE HOME PAGE 296const filterBtn = document.querySelector(".filter-btn"); 297const filterModal = document.getElementById("filter-modal"); 298 299if(filterBtn) { 300 301 filterBtn.addEventListener('click', function(event) { 302 event.stopPropagation(); // Prevent click event from propagating to document 303 if (filterModal) { 304 305 filterModal.classList.toggle('toggle-modal'); 306 } 307 }); 308} 309 310document.addEventListener('click', function(event) { 311 const target = event.target; 312 if ( 313 filterModal && !filterModal.contains(target) && 314 target !== filterBtn 315 ) { 316 filterModal.classList.remove('toggle-modal'); 317 } 318}); 319 320 321// AJAX 322// filter fixtures on homepage 323$(document).ready(function() { 324 // Initial call to populate fixtures with "all" value 325 var selectedValue = "home"; // Set the initial value 326 $.ajax({ 327 url: '/ajax/ajax-filter-fixtures.php', 328 method: 'POST', 329 data: { value: selectedValue }, 330 success: function(response) { 331 // Handle the response from the server 332 $(".fixtures-container").html(response); 333 }, 334 error: function(xhr, status, error) { 335 // Handle AJAX error 336 console.error(error); 337 } 338 }); 339 340 // Event listener for radio button change 341 $('input[name="fixtures_filter"]').change(function() { 342 filterModal.classList.remove('toggle-modal'); 343 var selectedValue = $(this).val(); // Get the selected value 344 345 // Send AJAX request 346 $.ajax({ 347 url: '/ajax/ajax-filter-fixtures.php', 348 method: 'POST', 349 data: { value: selectedValue }, 350 success: function(response) { 351 // Handle the response from the server 352 $(".fixtures-container").html(response); 353 }, 354 error: function(xhr, status, error) { 355 // Handle AJAX error 356 console.error(error); 357 } 358 }); 359 }); 360}); 361 362 363// CHANGE THE IMAGE ON THE FULL SCREEN NAV WHEN THE LINKS ARE HOVERED 364const fixturesLink = document.getElementById("full-screen-nav--link-fixtures"); 365const newsLink = document.getElementById("full-screen-nav--link-news"); 366const playersLink = document.getElementById("full-screen-nav--link-players"); 367const ticketsLink = document.getElementById("full-screen-nav--link-tickets"); 368const communityLink = document.getElementById("full-screen-nav--nav-link-community"); 369const academyLink = document.getElementById("full-screen-nav--nav-link-academy"); 370const sponsorshipLink = document.getElementById("full-screen-nav--link-sponsorship"); 371const navMoreLink = document.getElementById("full-screen-nav--link-more"); 372const navFansLink = document.getElementById("full-screen-nav--nav-link-fans"); 373const fullNavImg = document.querySelector(".full-screen-nav--image-container img"); 374const background = document.querySelector(".full-screen-nav--links-container"); 375 376// Not on mobiles or small tablets 377// if(window.innerWidth > 786 ) { 378// document.addEventListener("mouseover", function() { 379// fullNavImg.parentElement.classList.remove("fade-in"); 380// }) 381// fixturesLink.addEventListener("mouseover", function(event) { 382// event.stopPropagation(); 383// fullNavImg.src = "../images/game-photos/PWB_Knights_Phantoms17.jpg"; 384// fullNavImg.parentElement.classList.add("fade-in"); 385// }); 386 387// newsLink.addEventListener("mouseover", function(event) { 388// event.stopPropagation(); 389// fullNavImg.src = "../images/game-photos/PWB_Knights_Phantoms03.jpg"; 390// fullNavImg.parentElement.classList.add("fade-in"); 391// }); 392 393// playersLink.addEventListener("mouseover", function(event) { 394// event.stopPropagation(); 395// fullNavImg.src = "../images/game-photos/PWB_Knights_Phantoms14.jpg"; 396// fullNavImg.parentElement.classList.add("fade-in"); 397// }); 398 399// ticketsLink.addEventListener("mouseover", function(event) { 400// event.stopPropagation(); 401// fullNavImg.src = "../images/game-photos/PWB_Knights_Phantoms02.jpg"; 402// fullNavImg.parentElement.classList.add("fade-in"); 403// }); 404// sponsorshipLink.addEventListener("mouseover", function(event) { 405// event.stopPropagation(); 406// fullNavImg.src = "../images/game-photos/RAW09659.jpg"; 407// fullNavImg.parentElement.classList.add("fade-in"); 408// }); 409// navFansLink.addEventListener("mouseover", function(event) { 410// event.stopPropagation(); 411// fullNavImg.src = "../images/game-photos/4.jpg"; 412// fullNavImg.parentElement.classList.add("fade-in"); 413// }); 414 415// navMoreLink.addEventListener("mouseover", function(event) { 416// event.stopPropagation(); 417// fullNavImg.src = "../images/game-photos/PWB_Knights_Phantoms01.jpg";
418// fullNavImg.parentElement.classList.add("fade-in"); 419// }); 420// } 421 422if (sponsorsLink) { 423 sponsorsLink.addEventListener("click", function(event) { 424 event.stopPropagation(); // Prevent the click event from reaching the document 425 426 // Toggle the display of slide-out links 427 sponsorsSlideOutLinks.style.display = "block"; 428 if(fansLink) { 429 fansSlideOutLinks.style.display = "none"; 430 } 431 if(ticketsMoreLink) { 432 ticketsSlideOutLinks.style.display = "none"; 433 } 434 if(communityMoreLink) { 435 communitySlideOutLinks.style.display = "none"; 436 } 437 if(academyMoreLink) { 438 academySlideOutLinks.style.display = "none"; 439 } 440 }); 441 442 if(window.innerWidth > 786 ) { 443 sponsorsLink.addEventListener("mouseenter", function(event) { 444 event.stopPropagation(); // Prevent the click event from reaching the document 445 446 // Toggle the display of slide-out links 447 sponsorsSlideOutLinks.style.display = "block"; 448 if(fansLink) { 449 fansSlideOutLinks.style.display = "none"; 450 } 451 if(ticketsMoreLink) { 452 ticketsSlideOutLinks.style.display = "none"; 453 } 454 if(communityMoreLink) { 455 communitySlideOutLinks.style.display = "none"; 456 } 457 if(academyMoreLink) { 458 academySlideOutLinks.style.display = "none"; 459 } 460 }); 461 462 463 sponsorsSlideOutLinks.addEventListener("mouseleave", function(event) { 464 event.stopPropagation(); // Prevent the click event from reaching the document 465 466 // Toggle the display of slide-out links 467 sponsorsSlideOutLinks.style.display = "none"; 468 }); 469} 470} 471if (fansLink) { 472 fansLink.addEventListener("click", function(event) { 473 event.stopPropagation(); // Prevent the click event from reaching the document 474 475 // Toggle the display of slide-out links 476 fansSlideOutLinks.style.display = "block"; 477 if(sponsorsLink) { 478 sponsorsSlideOutLinks.style.display = "none"; 479 } 480 if(ticketsMoreLink) { 481 ticketsSlideOutLinks.style.display = "none"; 482 } 483 if(communityMoreLink) { 484 communitySlideOutLinks.style.display = "none"; 485 } 486 if(academyMoreLink) { 487 academySlideOutLinks.style.display = "none"; 488 } 489 }); 490 if(window.innerWidth > 786 ) { 491 fansLink.addEventListener("mouseenter", function(event) { 492 event.stopPropagation(); // Prevent the click event from reaching the document 493 494 // Toggle the display of slide-out links 495 fansSlideOutLinks.style.display = "block"; 496 if(sponsorsLink) { 497 sponsorsSlideOutLinks.style.display = "none"; 498 } 499 if(ticketsMoreLink) { 500 ticketsSlideOutLinks.style.display = "none"; 501 } 502 if(communityMoreLink) { 503 communitySlideOutLinks.style.display = "none"; 504 } 505 if(academyMoreLink) { 506 academySlideOutLinks.style.display = "none"; 507 } 508 }); 509 fansSlideOutLinks.addEventListener("mouseleave", function(event) { 510 event.stopPropagation(); // Prevent the click event from reaching the document 511 512 // Toggle the display of slide-out links 513 fansSlideOutLinks.style.display = "none"; 514 515 }); 516} 517} 518if (ticketsMoreLink) { 519 ticketsMoreLink.addEventListener("click", function(event) { 520 event.stopPropagation(); // Prevent the click event from reaching the document 521 522 // Toggle the display of slide-out links 523 ticketsSlideOutLinks.style.display = "block"; 524 if(sponsorsLink) { 525 sponsorsSlideOutLinks.style.display = "none"; 526 } 527 if(fansLink) { 528 fansSlideOutLinks.style.display = "none"; 529 } 530 if(communityMoreLink) { 531 communitySlideOutLinks.style.display = "none"; 532 } 533 if(academyMoreLink) { 534 academySlideOutLinks.style.display = "none"; 535 } 536 537 }); 538 539 if(window.innerWidth > 786 ) { 540 ticketsMoreLink.addEventListener("mouseenter", function(event) { 541 console.log('tickets') 542 event.stopPropagation(); // Prevent the click event from reaching the document 543 544 // Toggle the display of slide-out links 545 ticketsSlideOutLinks.style.display = "block"; 546 if(sponsorsLink) { 547 sponsorsSlideOutLinks.style.display = "none"; 548 } 549 if(fansLink) { 550 fansSlideOutLinks.style.display = "none"; 551 } 552 if(communityMoreLink) { 553 communitySlideOutLinks.style.display = "none"; 554 } 555 if(academyMoreLink) { 556 academySlideOutLinks.style.display = "none"; 557 } 558 }); 559 ticketsSlideOutLinks.addEventListener("mouseleave", function(event) { 560 event.stopPropagation(); // Prevent the click event from reaching the document 561 562 // Toggle the display of slide-out links 563 ticketsSlideOutLinks.style.display = "none"; 564 565 }); 566} 567} 568 569 570if (communityMoreLink) { 571 communityMoreLink.addEventListener("click", function(event) { 572 console.log('community click') 573 event.stopPropagation(); // Prevent the click event from reaching the document 574 575 // Toggle the display of slide-out links 576 communitySlideOutLinks.style.display = "block"; 577 if(fansLink) { 578 fansSlideOutLinks.style.display = "none"; 579 } 580 if(ticketsMoreLink) { 581 ticketsSlideOutLinks.style.display = "none"; 582 } 583 if(sponsorsLink) { 584 sponsorsSlideOutLinks.style.display = "none"; 585 } 586 if(academyMoreLink) { 587 academySlideOutLinks.style.display = "none"; 588 } 589 }); 590 591 if(window.innerWidth > 786 ) { 592 communityMoreLink.addEventListener("mouseenter", function(event) { 593 console.log('community hover') 594 event.stopPropagation(); // Prevent the click event from reaching the document 595 596 // Toggle the display of slide-out links 597 communitySlideOutLinks.style.display = "block"; 598 if(fansLink) { 599 fansSlideOutLinks.style.display = "none"; 600 } 601 if(ticketsMoreLink) { 602 ticketsSlideOutLinks.style.display = "none"; 603 } 604 if(sponsorsLink) { 605 sponsorsSlideOutLinks.style.display = "none"; 606 } 607 if(academyMoreLink) { 608 academySlideOutLinks.style.display = "none"; 609 } 610 }); 611 612
613 communitySlideOutLinks.addEventListener("mouseleave", function(event) { 614 console.log('community links leave') 615 event.stopPropagation(); // Prevent the click event from reaching the document 616 617 // Toggle the display of slide-out links 618 communitySlideOutLinks.style.display = "none"; 619 }); 620} 621} 622 623if (academyMoreLink) { 624 academyMoreLink.addEventListener("click", function(event) { 625 console.log('community click') 626 event.stopPropagation(); // Prevent the click event from reaching the document 627 628 // Toggle the display of slide-out links 629 academySlideOutLinks.style.display = "block"; 630 if(fansLink) { 631 fansSlideOutLinks.style.display = "none"; 632 } 633 if(ticketsMoreLink) { 634 ticketsSlideOutLinks.style.display = "none"; 635 } 636 if(sponsorsLink) { 637 sponsorsSlideOutLinks.style.display = "none"; 638 } 639 if(academyMoreLink) { 640 communitySlideOutLinks.style.display = "none"; 641 } 642 }); 643 644 if(window.innerWidth > 786 ) { 645 academyMoreLink.addEventListener("mouseenter", function(event) { 646 console.log('community hover') 647 event.stopPropagation(); // Prevent the click event from reaching the document 648 649 // Toggle the display of slide-out links 650 academySlideOutLinks.style.display = "block"; 651 if(fansLink) { 652 fansSlideOutLinks.style.display = "none"; 653 } 654 if(ticketsMoreLink) { 655 ticketsSlideOutLinks.style.display = "none"; 656 } 657 if(sponsorsLink) { 658 sponsorsSlideOutLinks.style.display = "none"; 659 } 660 if(academyMoreLink) { 661 communitySlideOutLinks.style.display = "none"; 662 } 663 }); 664 665 666 academySlideOutLinks.addEventListener("mouseleave", function(event) { 667 console.log('community links leave') 668 event.stopPropagation(); // Prevent the click event from reaching the document 669 670 // Toggle the display of slide-out links 671 academySlideOutLinks.style.display = "none"; 672 }); 673} 674} 675 676if (fixturesLink) { 677 fixturesLink.addEventListener("click", function(event) { 678 event.stopPropagation(); // Prevent the click event from reaching the document 679 680 // Toggle the display of slide-out links 681 fixturesSlideOutLinks.style.display = "block"; 682 683 }); 684 if(window.innerWidth > 786 ) { 685 fixturesLink.addEventListener("mouseenter", function(event) { 686 event.stopPropagation(); // Prevent the click event from reaching the document 687 console.log('mouse in') 688 // Toggle the display of slide-out links 689 fixturesSlideOutLinks.style.display = "block"; 690 691 }); 692 fixturesSlideOutLinks.addEventListener("mouseleave", function(event) { 693 event.stopPropagation(); // Prevent the click event from reaching the document 694 // Toggle the display of slide-out links 695 fixturesSlideOutLinks.style.display = "none"; 696 697 }); 698} 699} 700 701 // Hide slide-out links when clicking anywhere else on the page 702 fullScreenMoreNav.addEventListener("click", function(event) { 703 if (sponsorsLink) { 704 705 if (event.target !== sponsorsLink && event.target !== sponsorsSlideOutLinks) { 706 sponsorsSlideOutLinks.style.display = "none"; 707 } 708 } 709 if (fansLink) { 710 711 if (event.target !== fansLink && event.target !== fansSlideOutLinks) { 712 fansSlideOutLinks.style.display = "none"; 713 } 714 } 715 if (ticketsMoreLink) { 716 717 if (event.target !== ticketsMoreLink && event.target !== ticketsSlideOutLinks) { 718 ticketsSlideOutLinks.style.display = "none"; 719 } 720 } 721 if (communityMoreLink) { 722 723 if (event.target !== communityMoreLink && event.target !== communitySlideOutLinks) { 724 communitySlideOutLinks.style.display = "none"; 725 } 726 } 727 728 }); 729 730 // Hide slide-out links when clicking anywhere else on the page 731 fullScreenNav.addEventListener("click", function(event) { 732 if (fixturesLink) { 733 734 if (event.target !== fixturesLink && event.target !== fixturesSlideOutLinks) { 735 fixturesSlideOutLinks.style.display = "none"; 736 } 737 } 738 739 740 }); 741 742// DEAL WITH REDIRECT BANNER 743const banner = document.getElementById("redirect-banner"); 744 745if(banner) { 746 747 setTimeout(closeBanner, 6000) 748 749 function closeBanner() { 750 banner.style.display = "none"; 751 } 752} 753
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.