два способа, но они не сработали, хотя функция выполняется:
                  
                  
                  function remove_hash_from_url() {
                  
                  
                      let uri = window.location.toString();
                  
                  
                      if (uri.indexOf("#") > 0) {
                  
                  
                          history.pushState("", document.title, window.location.pathname);
                  
                  
                      }
                  
                  
                  }
                  
                  
                  
                  
                  
                  function remove_hash_from_url() {
                  
                  
                      let uri = window.location.toString();
                  
                  
                      if (uri.indexOf("#") > 0) {
                  
                  
                          let clean_uri = uri.substring(0, uri.indexOf("#"));
                  
                  
                          console.log(window.location.pathname)
                  
                  
                          window.history.replaceState({}, document.title, clean_uri);
                  
                  
                      }
                  
                  
                  }
                  
                  
                
Там целый Фреймворк, не раскопать (
https://stackoverflow.com/a/3354511/9603201 раскопать
сначала удостоверить что оно работает — потом погуглить смежное
Обсуждают сегодня