I am creating javascript that checks links in the DOM and changes those who are NOT absolute links. Unfortunately, Iām out of luck ...
I would like to map only the first type of links below and add the path to the folder
<a href="somepage.html">link</a><a href"http://somesite.net/somepage.html">link</a>
I used to string.replace(/a.+href="([^http]+)"/, 'path'+$1);no avail ...
Can someone help me here? Thanks in advance.
source
share