mirror of
https://github.com/Decentralized-ID/decentralized-id.github.io.git
synced 2025-08-21 12:28:30 -04:00
target blank
This commit is contained in:
parent
a8fcb710a6
commit
6bd786c704
2 changed files with 11 additions and 0 deletions
10
assets/js/mod_outer_links.js
Normal file
10
assets/js/mod_outer_links.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
$(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");
|
||||
}
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue