diff --git a/src/FilterLists.Web/ClientApp/components/Home.tsx b/src/FilterLists.Web/ClientApp/components/Home.tsx index 9c3feb772..20f5ad0e7 100644 --- a/src/FilterLists.Web/ClientApp/components/Home.tsx +++ b/src/FilterLists.Web/ClientApp/components/Home.tsx @@ -199,15 +199,34 @@ interface IListTagDto { } function SubscribeUrl(props: any) { - return props.url.indexOf("web.archive.org") !== -1 - ? ( - Subscribe - ) - : ( - Subscribe - ); -} \ No newline at end of file + const titleBase = "Subscribe to list with browser extension supporting \"abp:\" protocol (e.g. uBlock Origin, AdBlock Plus)."; + return props.url.indexOf("https://") === -1 + ? SubscribeUrlNotSecure() + : props.url.indexOf("web.archive.org") === -1 + ? SubscribeUrlPrimary() + : SubscribeUrlWayback(); + + function SubscribeUrlPrimary() { + return + Subscribe + ; + } + + function SubscribeUrlWayback() { + return + Subscribe + ; + } + + function SubscribeUrlNotSecure() { + return + Subscribe + ; + } +}; \ No newline at end of file diff --git a/src/FilterLists.Web/ClientApp/components/ListDetails.tsx b/src/FilterLists.Web/ClientApp/components/ListDetails.tsx index 05e1d880e..d0fd8d768 100644 --- a/src/FilterLists.Web/ClientApp/components/ListDetails.tsx +++ b/src/FilterLists.Web/ClientApp/components/ListDetails.tsx @@ -168,30 +168,69 @@ function License(props: any) { } function SubscribeUrl(props: any) { - return props.url.indexOf("web.archive.org") !== -1 - ? ( - Subscribe - ) - : ( - Subscribe - ); -} + const titleBase = "Subscribe to list with browser extension supporting \"abp:\" protocol (e.g. uBlock Origin, AdBlock Plus)."; + return props.url.indexOf("https://") === -1 + ? SubscribeUrlNotSecure() + : props.url.indexOf("web.archive.org") === -1 + ? SubscribeUrlPrimary() + : SubscribeUrlWayback(); + + function SubscribeUrlPrimary() { + return + Subscribe + ; + } + + function SubscribeUrlWayback() { + return + Subscribe + ; + } + + function SubscribeUrlNotSecure() { + return + Subscribe + ; + } +}; function ViewUrl(props: any) { - return props.url.indexOf("web.archive.org") !== -1 - ? ( - View - ) - : ( - View - ); -} + return props.url.indexOf("https://") === -1 + ? ViewUrlNotSecure() + : props.url.indexOf("web.archive.org") === -1 + ? ViewUrlPrimary() + : ViewUrlWayback(); + + function ViewUrlPrimary() { + return + View + ; + } + + function ViewUrlWayback() { + return + View + ; + } + + function ViewUrlNotSecure() { + return + View + ; + } +}; function HomeUrl(props: any) { return props.url