Entfernen Sie Hash von URL JavaScript

function removeHash () { 
    history.pushState("", document.title, window.location.pathname
                                                       + window.location.search);
}
Homemadesteam58