mirror of
https://github.com/bigchaindb/site.git
synced 2024-11-25 03:03:16 +01:00
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
Block a user