document.addEventListener("DOMContentLoaded", function() { if (window.location.hash) { history.replaceState(null, null, window.location.pathname); } });