I have the need to make changes to all hyperlinks on a page using Java Script. Currently the the tags are laid out in this maner
<a href="/Level1/Level2/Level3/bla bla bla.aspx" The change I am really struggling with (Being a absolute Noob in this field) is how i can make the following change and add in another level? Its subsite with the same structure;
<a href="/Level1/Level2/Level3/+Level4/bla bla bla.aspx" Sections of the URL pre and post the addition of "level 4" will remain the same. I need this change to be applied to all Hyperlinks on the page that do not have the level 4 portion already present.
Apologies for the shocking request. First time posting.
<a>withif (a.href.indexOf('Level4') == -1) a.href = a.href.replace('Level3/', 'Level3/+Level4/')