If you want the query string, just use `document.location.search` directly.