davwheat Hi, I'm not very good with JS, but I was looking around the code to try to understand it and with a bit of help from ChatGPT, I was wondering if this little change would do it (open all external links in new tab/window):
in the file flarum-ext-custom-sidenav-links/js/src/forum
/index.tsx (line 41) we have this code:
items.add(
'customLink-' + i,
<LinkButton external={!link.internal} href={href} rel="noopener noreferrer" icon={link.icon}>
{link.text}
</LinkButton>,
priority
);
and we could maybe add this target={link.internal ? null : "_blank"}
before icon=
:
items.add(
'customLink-' + i,
<LinkButton external={!link.internal} href={href} rel="noopener noreferrer" target={link.internal ? null : "_blank"} icon={link.icon}>
{link.text}
</LinkButton>,
priority
);
would that do it?