// forces a trailing slash in the browser
// url so that relative urls make sense.
window.addEventListener('load', () => {
  let pams = window.location.search;
  let path = window.location.pathname;
  if (path.slice(-1) !== '/') {
    window.history.replaceState(null, null, path + '/' + pams)
  }
})