On a modal how do I show the URL of the "hyperlink" that was clicked to bring up the modal?

On a modal how do I show the URL of the "hyperlink" that was clicked to bring up the modal?

Please help!!! I have spent 10 hours on this issue alone.

When an external link is clicked a modal pops up to state that the clicked link goes to an external site. That all works fine.

I need to add in my text on the modal, the URL of the external link (for example: " http://www.notMySite.com") that was clicked and to go to " http://www.notMySite.com" when the continue button is clicked.

I have a class named ext-link (for example: <a  class="ext-link" href=" http://www.notMySite.com"></a>) added to all external links on my site.

No confirms or alerts will do in this case.

EXAMPLE of MODAL:

You are leaving my site:

To proceed to http://www.notMySite.com, please click on the Continue button below.

Continue

Thank you