const map = { home: '/', about: '/about/', news: '/news/', join: '/join/', privacy: '/privacy/', community: '/community/' }; const target = map[location.hash.slice(1)]; if (target) location.replace(target);