Skip to content
Snippets Groups Projects
Commit 366777b0 authored by Anton Sarukhanov's avatar Anton Sarukhanov
Browse files

Open external links in new tab.

parent 57113eb6
No related branches found
No related tags found
No related merge requests found
......@@ -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';
}
}
})();
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment