mirror of
https://github.com/bigchaindb/site.git
synced 2025-02-14 21:10:28 +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
|
// Automatically add header links to all Markdown headings
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user