// Scroll to Top
window.onscroll = function() {
  const knowledgehub_button = document.querySelector('.back-to-top');
  if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
    knowledgehub_button.style.display = "block";
  } else {
    knowledgehub_button.style.display = "none";
  }
};

document.querySelector('.back-to-top a').onclick = function(event) {
  event.preventDefault();
  window.scrollTo({top: 0, behavior: 'smooth'});
};