First off, in most browsers this sort of thing doesn't really work well all of the time locally. You would have to test it on a live page.
And that code assumes your domain name includes the word quicklinks, does it?
Anyway, there are various ways to deal with it. The easiest might be to put your domain name in there and mailto, like instead of:
Code:
mat[c]=anc[c].href.match(/quicklinks*/g);
Do like:
Code:
mat[c]=anc[c].href.match(/(mydomainname)|(mailto:)/);
where mydomainname is your actual domain name. But there are a number of things I don't like about that code.
And we can get the domain, actually the hostname from javascript, and you can add in mailto: for mail links. What I'd do is scrap that script and use instead:
Code:
<script type="text/javascript">
(function(){
var linktitle = "You're Leaving!", // Configure Title for External Links
h = location.hostname.replace(/www\./, ''),
re = new RegExp('(' + h + ')|(mailto:)');
function externalLink(){
var a = document.links;
for(var i = 0; i < a.length; ++i){
if(!re.test(a[i].href)){
a[i].title = linktitle;
}
}
}
if (window.addEventListener){
window.addEventListener('load', externalLink, false);
}
else if (window.attachEvent){
window.attachEvent('onload', externalLink);
}
})();
</script>
Demo:
http://home.comcast.net/~jscheuer1/s...rnal_links.htm
Bookmarks