Get part of URL and add to specific links in page

is the same as

var params = window.location.search.slice(1)

If you don’t need to drop the ? then you can simply reference location.search

1 Like