You can use the below code. It will remove the query string from URL.
discourseEmbedUrl: window.location.href.split(/[?#]/)[0] };
You can use the below code. It will remove the query string from URL.
discourseEmbedUrl: window.location.href.split(/[?#]/)[0] };