mirror of
https://github.com/Decentralized-ID/decentralized-id.github.io.git
synced 2024-10-01 01:05:54 -04:00
11 lines
331 B
JavaScript
11 lines
331 B
JavaScript
|
$(function () {
|
||
|
// add `target="_blank"` to outgoing links.
|
||
|
var host = document.location.host;
|
||
|
$("a[href]").each(function() {
|
||
|
var re = new RegExp(host, "g");
|
||
|
if ($(this).attr("href").match(/\/\//) && !$(this).attr("href").match(re)) {
|
||
|
$(this).attr("target", "_blank");
|
||
|
}
|
||
|
});
|
||
|
});
|