diff --git a/_src/_assets/javascripts/bigchain.js b/_src/_assets/javascripts/bigchain.js index cf460e2..c158224 100644 --- a/_src/_assets/javascripts/bigchain.js +++ b/_src/_assets/javascripts/bigchain.js @@ -40,6 +40,17 @@ jQuery(function($) { ); + // + // Open all external links in new window + // + $('a').not('[href*="mailto:"]').each(function () { + var isInternalLink = new RegExp('/' + window.location.host + '/'); + if ( !isInternalLink.test(this.href) ) { + $(this).attr('target', '_blank'); + } + }); + + // // Automatically add header links to all Markdown headings //