Commit 366777b0 authored by Anton Sarukhanov's avatar Anton Sarukhanov

Open external links in new tab.

parent 57113eb6
......@@ -76,4 +76,18 @@
}
}).change();
}
})("form")
})("form");
/* Make all external links open in new tab.
* Adapted from http://mitchbarry.com/handling-external-links/
*/
(function() {
for (var links = document.links, i = 0, link; link = links[i]; i++) {
if (link.hostname !== window.location.host.split('.').slice(-2).join('.')) {
link.target = '_blank';
}
}
})();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment