LillaGreen replied
Thank you!
Hi, I want that all links open in a new tab, instead of editing those every single time.
Can I use the script:
function autoblank() {
var links = document.links;
for (let i = 0, linksLength = links.length ; i < linksLength ; i++) {
if (links[i].hostname !== window.location.hostname) {
links[i].target = '_blank';
links[i].rel = 'noopener noreferrer'; // This is for security purposes
}
}
}
autoblank();
is it correct and Should I add it to my footer.php ? Is there a better option than that? Thank you!
Want to join this conversation or access attachments? Sign in first.
Open your ticket archive, review validated licenses, and continue product support conversations from one customer portal.