Add a Prefix word on all Website Href Links

by Dinesh 2014-02-24 18:30:15

Add a Prefix word on all Website Href Links



It its a simple jscript that converts all href links in a website with magic prefix word which you want to add.

var links = document.links;
for (var i=0, iLen=links.length; i // use of // is to avoid SO posting rules
links[i].href = 'http://yourprefixword.com/' + links[i].href;
}

Tagged in:

964
like
0
dislike
0
mail
flag

You must LOGIN to add comments