On clicked, the following characters will be removed from the URL pasted in the field above

👉 https://domain.com/contracts/brands/

Then, the following text will be prepended to the remaining text

👉 https://catalogs.domain.com/

The script should also look for and remove anything at the end that starts with “#” eg

👉 #p=1

Finally, the following clean URL will be generated and populated in the field below. Clicking the button below should copy text to clipboard so user can paste it in somewhere else.