javascript obtient l'emplacement de la fenêtre actuelle sans paramètres

const url = window.location.origin + window.location.pathname
//http://example.com/somedir/somefile/
Impossible Ibis