1
0
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:
Matthias Kretschmann 2016-02-09 01:36:57 +01:00
parent ec65a32f5c
commit 63dafcd4f8

View File

@ -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
//