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:
7
docs/javascripts/extra.js
Normal file
7
docs/javascripts/extra.js
Normal 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();
|
Reference in New Issue
Block a user