Use BTT to change subdomain of a clicked url

I would like to use BTT so that when I click a URL (with a modifier key) it runs code (applescript, javascript or shellscript) that will change the subdomain of the url (e.g from www to pro)

I have looked into advanced scripting functions but not sure where I should go with this.

Many thanks for any help

Does anybody have any help on this please?

@Andreas_Hegenberg ?

this can only be done if the url is clicked outside of a browser. Inside of a browser you would need a browser extension to achieve this.

OK Thanks @Andreas_Hegenberg