Closed sprite2200 closed 4 years ago
I added a external.js as follows: 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();
save it in /theme/external.js and call it in the main go
HI there, I know that we could always use example to force a hyperlink to open in new tab.
But the case I have already wrote like hundreds of them, is it possible there is a switch somewhere to do this? Thanks! btw, like this repo so much!