remove LBRY_INC_DOMAINS list
This commit is contained in:
parent
bf512e8338
commit
6a69ffe0fb
2 changed files with 1 additions and 22 deletions
|
@ -5,7 +5,6 @@ import * as React from 'react';
|
|||
import { isURIValid } from 'lbry-redux';
|
||||
import Button from 'component/button';
|
||||
import ClaimLink from 'component/claimLink';
|
||||
import { isLBRYDomain } from 'util/url';
|
||||
|
||||
type Props = {
|
||||
href: string,
|
||||
|
@ -39,8 +38,7 @@ class ExternalLink extends React.PureComponent<Props> {
|
|||
label={children}
|
||||
className="button--external-link"
|
||||
onClick={() => {
|
||||
const isTrusted = isLBRYDomain(href);
|
||||
openModal(MODALS.CONFIRM_EXTERNAL_RESOURCE, { uri: href, isTrusted: isTrusted });
|
||||
openModal(MODALS.CONFIRM_EXTERNAL_RESOURCE, { uri: href, isTrusted: false });
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
const LBRY_INC_DOMAINS = ['lbry.io', 'lbry.com', 'lbry.tv', 'lbry.tech', 'lbry.fund', 'spee.ch'];
|
||||
|
||||
exports.formatLbryUrlForWeb = uri => {
|
||||
return uri.replace('lbry://', '/').replace(/#/g, ':');
|
||||
};
|
||||
|
@ -18,23 +16,6 @@ exports.formatFileSystemPath = path => {
|
|||
return encodeURI(`file://${webUrl}`).replace(/[?#]/g, encodeURIComponent);
|
||||
};
|
||||
|
||||
exports.isLBRYDomain = uri => {
|
||||
if (!uri) {
|
||||
return;
|
||||
}
|
||||
|
||||
const myURL = new URL(uri);
|
||||
const hostname = myURL.hostname;
|
||||
|
||||
for (let domain of LBRY_INC_DOMAINS) {
|
||||
if (hostname.endsWith(domain)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
/*
|
||||
Function that handles page redirects
|
||||
ex: lbry://?rewards
|
||||
|
|
Loading…
Reference in a new issue