https://tutorial.eyehunts.com/js/get-the-url-without-any-parameters-in-javascript-example-code/
Get the URL without any parameters in JavaScript | Example code