PageSourceSearch

https://www.overwolf.com/system/modules/com.overwolf.website/resources/js/branding2021/scripts.js

js overwolf.com collected 2026-09-24 08:43:03 UTC 1,875 bytes, 57 lines download raw bytes

1document.addEventListener("DOMContentLoaded", () => {
2
3
4//sticky header
5  window.addEventListener("scroll", function(){
6    const headerElm = document.querySelector('header');
7    if(window.scrollY==0){
8      headerElm.classList.remove('sticky');
9    } else {
10      headerElm.classList.add('sticky');
11    }
12  });
13
14function openCloseMobileNavMenu(){
15  const navMenu = document.querySelector('.site-header nav');
16  if(navMenu.classList.contains('is-open')){
17    navMenu.classList.remove('is-open');
18    document.querySelector('#hamburger-menu-button').classList.remove('close');
19    document.querySelector('.site-header').style.position = 'sticky';
20    // close all menus
21    setTimeout(function(){
22      navMenu.querySelectorAll('.is-open').forEach(submenu => submenu.classList.remove('is-open'));
23    }, 1000);
24    document.body.style.overflow = "";
25  } else {
26    navMenu.classList.add('is-open');
27    document.querySelector('#hamburger-menu-button').classList.add('close');
28    document.body.style.overflow = "hidden";
29    document.querySelector('.site-header').style.position = 'fixed';
30  }
31
32  document.querySelectorAll('.site-header li a').forEach(function (a){
33    a.addEventListener('click', e => {
34      e.preventDefault();
35
36      let hasSubMenu = a.parentElement.classList.contains('has-submenu');
37      let isOpen = a.parentElement.classList.contains('is-open');
38
39      if(!hasSubMenu) {
40        window.location.href = a.href
41      }
42
43      if(hasSubMenu && !isOpen) {
44        a.parentElement.classList.add('is-open');
45      } else if(isOpen) {
46        a.parentElement.classList.remove('is-open');
47        a.parentElement.querySelectorAll('.is-open').forEach(function (openItem){
48          openItem.classList.remove('is-open')
49        });
50      }
51
52    })
53  })
54}
55
56document.querySelector('#hamburger-menu-button').addEventListener('click', openCloseMobileNavMenu);
57});

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.