diff --git a/ui/component/button/view.jsx b/ui/component/button/view.jsx index a41f065d5..7821fd883 100644 --- a/ui/component/button/view.jsx +++ b/ui/component/button/view.jsx @@ -145,11 +145,19 @@ const Button = forwardRef((props: Props, ref: any) => { ); + // check if the link is for odysee.com + function isAnOdyseeLink(urlString) { + return urlString.indexOf('https://odysee.com') !== -1 || urlString.indexOf('http://odysee.com') !== -1; + } + + // if it's an internal link we won't open a new tab + const isAnInternalLink = (href || navigate) && (isAnOdyseeLink(href) || isAnOdyseeLink(navigate)); + if (href || (navigate && navigate.startsWith('http'))) { // TODO: replace the below with an outbound link tracker for matomo return (