const urlParams = new URLSearchParams(window.location.search);
const currency = urlParams.get('currency');
https://stackoverflow.com/questions/...-in-javascript