2
0
mirror of https://github.com/inventree/inventree-docs.git synced 2025-06-15 03:35:35 +00:00

Now opening external links in new tab (added little icon), started build documentation

This commit is contained in:
eeintech
2020-09-24 11:56:02 -05:00
parent c08ec0a2a4
commit 5ae5e518bc
5 changed files with 47 additions and 2 deletions

View File

@ -0,0 +1,7 @@
/* Add target="_blank" to external links */
/* Source: https://html.com/attributes/a-target/#:~:text=browser */
function externalLinks() {
for(var c = document.getElementsByTagName("a"), a = 0;a < c.length;a++) {
var b = c[a]; b.getAttribute("href") && b.hostname !== location.hostname && (b.target = "_blank")
}
} ; externalLinks();