mirror of https://github.com/bigchaindb/site.git
open all external links in new window, closes #29
This commit is contained in:
parent
ec65a32f5c
commit
63dafcd4f8
|
@ -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
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue