Return to Snippet

Revision: 7123
at July 8, 2008 10:33 by wesbaker


Updated Code
<script type="text/javascript">
	function externalLinks() {
		if (!document.getElementsByTagName) return;
		var anchors = document.getElementsByTagName('a');
		for each (anchor in anchors) {
			if (anchor.getAttribute('href') && anchor.getAttribute('rel') == 'external') {
				anchor.target = '_blank';
			}
		}
	}
			
	window.onload = externalLinks;
</script>

Revision: 7122
at July 8, 2008 10:32 by wesbaker


Initial Code

                                

Initial URL

                                

Initial Description

                                

Initial Title
Valid External Links

Initial Tags
textmate, link

Initial Language
JavaScript