{"size": 1084, "ext": "js", "max_stars_repo_path": "assets/js/main.js", "max_stars_repo_name": "dhananjyan/piccocabs", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "assets/js/main.js", "max_issues_repo_name": "dhananjyan/piccocabs", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "assets/js/main.js", "max_forks_repo_name": "dhananjyan/piccocabs", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.5263157895, "max_line_length": 95, "alphanum_fraction": 0.6494464945}
//main script
const counters = document.querySelectorAll(".counting");
const speed =50;
const plus = document.querySelector('.plus');
function startCounter() {
   counters.forEach(counter => {
    const updateCount = () => {
      const target = +counter.getAttribute('data-count')
      const count = +counter.innerText;

      const inc = target / speed;
      console.log(inc)
      if (count < target) {
        counter.innerText = Math.floor(count + inc);
        setTimeout(updateCount, 25);
      } else {
        count.innerText = target;
      }

    }
    updateCount();
  });
}

  window.onscroll = function () { myFunction() };

  function myFunction() {
    var winScroll = document.body.scrollTop || document.documentElement.scrollTop;
    var height = document.documentElement.scrollHeight - document.documentElement.clientHeight;
    var scrolled = (winScroll / height) * 100;
    document.getElementById("myBar").style.width = scrolled + "%";
  }


  /*function closeNav(){
    var navEle = document.querySelector('.no-search');
    navEle.style.display='none';
  }*/