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