mirror of
https://github.com/NebulaServices/Nebula.git
synced 2025-05-17 13:30:00 -04:00
Tab cloaking
This commit is contained in:
parent
78635d2671
commit
4d7c8449d8
13 changed files with 150 additions and 36 deletions
|
@ -3,8 +3,9 @@ import { searchUtil } from "../util/searchUtil";
|
|||
import { useEffect, useState } from "preact/hooks";
|
||||
//import our Iframe component
|
||||
import { Iframe } from "../components/iframe/Iframe";
|
||||
|
||||
import CloakedHead from "../util/CloakedHead";
|
||||
import SiteSupport from "../util/SiteSupport.json";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
|
@ -14,6 +15,7 @@ declare global {
|
|||
}
|
||||
|
||||
export function ProxyFrame(props: { url: string }) {
|
||||
const { t } = useTranslation();
|
||||
// pass the URL encoded with encodeURIcomponent
|
||||
const localProxy = localStorage.getItem("proxy") || "automatic";
|
||||
const proxyMode = localStorage.getItem("proxyMode") || "embed";
|
||||
|
@ -104,6 +106,10 @@ export function ProxyFrame(props: { url: string }) {
|
|||
}
|
||||
return (
|
||||
<div class="h-screen w-screen bg-primary">
|
||||
<CloakedHead
|
||||
originalTitle={t("titles.home")}
|
||||
originalFavicon="/logo.png"
|
||||
/>
|
||||
{proxyMode === "direct" && <h1>Loading {localProxy}...</h1>}
|
||||
{proxyMode === "aboutblank" && <h1>Loading {localProxy}...</h1>}
|
||||
{proxyMode === "embed" && <Iframe url={ProxiedUrl} />}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue