{"size": 795, "ext": "js", "max_stars_repo_path": "main.js", "max_stars_repo_name": "creativeprogrammer47/responsivenav", "max_stars_repo_stars_event_min_datetime": "2021-01-26T05:42:25.000Z", "max_stars_repo_stars_event_max_datetime": "2021-01-26T05:42:25.000Z", "max_issues_repo_path": "main.js", "max_issues_repo_name": "creativeprogrammer47/responsivenav", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "main.js", "max_forks_repo_name": "creativeprogrammer47/responsivenav", "max_forks_repo_forks_event_min_datetime": "2021-09-01T17:26:21.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-01T17:26:21.000Z"}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 27.4137931034, "max_line_length": 81, "alphanum_fraction": 0.6641509434}
const hamburger = document.querySelector(".hamburger");
const navLinks = document.querySelector(".navbar");
const links = document.querySelectorAll(".navbar li");

hamburger.addEventListener("click", () => {
  navLinks.classList.toggle("open");
  links.forEach((link) => {
    link.classList.toggle("fade");
  });

  hamburger.classList.toggle("toggle");
});

const nav = document.querySelector("nav");
const home = document.querySelector(".home");

const homeOptions = {};

const homeObserver = new IntersectionObserver(function (entries, homeObserver) {
  entries.forEach((entry) => {
    if (!entry.isIntersecting) {
      nav.classList.add("scrolled");
    } else {
      nav.classList.remove("scrolled");
    }
  });
}, homeOptions);

homeObserver.observe(home);