@tristan-breon-1
https://www.w3schools.com/jsref/jsref_substring.asp
https://www.w3schools.com/jsref/jsref_splice.asp
and so on…
You can generate your new link by -->converting, cutting, replacing, removing, joining and doing what ever with your —> link-STRING.
Or you do it with regEx, but i think this would be a little bit more complicated, if you do not understand regEx.