mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-29 03:34:46 +01:00
16 lines
401 B
JavaScript
16 lines
401 B
JavaScript
;(function(window, document, undefined) {
|
|
|
|
"use strict";
|
|
|
|
// Open all external links in new tabs
|
|
var links = document.getElementsByTagName("a");
|
|
|
|
for(var i = 0; i < links.length; i++) {
|
|
var thisLink = links[i];
|
|
if(thisLink.getAttribute("href") && thisLink.hostName !== location.hostname) {
|
|
thisLink.target = "_blank";
|
|
}
|
|
}
|
|
|
|
})(window, document);
|