Booster Theme

Highlighted
New Member
1 0 0

Hi there,

I'm new here and just purchased and installed the booster theme for my website. I'm having issues opening a menu link in a new tab via code. I used the code below in two different files themes.scss.liquid and themes.js.liquid, however, it still doesn't work. Is there another file where I can add this code to? 

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 = 'noreferrer noopener';
}
}

 

Any advice would be appreciated. Thanks!

 

0 Likes