about:blank for entire nebula
This commit is contained in:
parent
3058151d55
commit
dbe076e801
4 changed files with 43 additions and 5 deletions
|
|
@ -46,7 +46,8 @@
|
||||||
},
|
},
|
||||||
"cloaking": {
|
"cloaking": {
|
||||||
"title": "Cloaking",
|
"title": "Cloaking",
|
||||||
"subtitle": "Choose how your tab looks"
|
"subtitle": "Choose how your tab looks",
|
||||||
|
"aboutblank": "open in about:blank"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"title": "Search Engine",
|
"title": "Search Engine",
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,8 @@
|
||||||
},
|
},
|
||||||
"cloaking": {
|
"cloaking": {
|
||||||
"title": "Encubrimiento",
|
"title": "Encubrimiento",
|
||||||
"subtitle": "Elige cómo se ve tu pestaña"
|
"subtitle": "Elige cómo se ve tu pestaña",
|
||||||
|
"aboutblank": "Abierte en about:blank"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"title": "Buscador",
|
"title": "Buscador",
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,8 @@
|
||||||
},
|
},
|
||||||
"cloaking": {
|
"cloaking": {
|
||||||
"title": "クローキング",
|
"title": "クローキング",
|
||||||
"subtitle": "タブの見た目を選択する"
|
"subtitle": "タブの見た目を選択する",
|
||||||
|
"aboutblank": "で開く about:blank"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"title": "検索エンジン",
|
"title": "検索エンジン",
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import { motion } from "framer-motion";
|
||||||
import { tabContentVariant, settingsPageVariant } from "./Variants";
|
import { tabContentVariant, settingsPageVariant } from "./Variants";
|
||||||
import CloakPreset from "./CloakPreset";
|
import CloakPreset from "./CloakPreset";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { LoadSuspense } from "../../LoadSuspense";
|
||||||
|
|
||||||
const TabSettings = ({ id, active }) => {
|
const TabSettings = ({ id, active }) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
@ -19,8 +20,12 @@ const TabSettings = ({ id, active }) => {
|
||||||
variants={settingsPageVariant}
|
variants={settingsPageVariant}
|
||||||
className="content-card flex w-full flex-col items-center justify-center text-center"
|
className="content-card flex w-full flex-col items-center justify-center text-center"
|
||||||
>
|
>
|
||||||
<div class="text-3xl font-bold text-input-text">{t("settings.cloaking.title")}</div>
|
<div class="text-3xl font-bold text-input-text">
|
||||||
<div class="text-md font-bold pb-5 text-input-text">{t("settings.cloaking.subtitle")}</div>
|
{t("settings.cloaking.title")}
|
||||||
|
</div>
|
||||||
|
<div class="text-md pb-5 font-bold text-input-text">
|
||||||
|
{t("settings.cloaking.subtitle")}
|
||||||
|
</div>
|
||||||
<div class="flex flex-row space-x-4">
|
<div class="flex flex-row space-x-4">
|
||||||
<CloakPreset faviconUrl="none" title="none" />
|
<CloakPreset faviconUrl="none" title="none" />
|
||||||
<CloakPreset
|
<CloakPreset
|
||||||
|
|
@ -44,6 +49,36 @@ const TabSettings = ({ id, active }) => {
|
||||||
title="Schoology"
|
title="Schoology"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="relative p-4">
|
||||||
|
<button
|
||||||
|
class="font-roboto h-14 w-56 rounded-2xl border border-input-border-color bg-input p-2 text-center text-xl font-bold text-input-text placeholder:text-input-text focus:outline-none"
|
||||||
|
onClick={() => {
|
||||||
|
let newWindow = window.open("about:blank");
|
||||||
|
let iframe = document.createElement("iframe");
|
||||||
|
iframe.src = window.location.origin;
|
||||||
|
iframe.style.width = "100%";
|
||||||
|
iframe.style.height = "100%";
|
||||||
|
iframe.style.border = "none";
|
||||||
|
iframe.style.overflow = "hidden";
|
||||||
|
iframe.style.margin = "0";
|
||||||
|
iframe.style.padding = "0";
|
||||||
|
iframe.style.position = "fixed";
|
||||||
|
iframe.style.top = "0";
|
||||||
|
iframe.style.bottom = "0";
|
||||||
|
iframe.style.left = "0";
|
||||||
|
iframe.style.right = "0";
|
||||||
|
newWindow.document.body.appendChild(iframe);
|
||||||
|
window.location.replace("https://google.com");
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<LoadSuspense />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t("settings.cloaking.aboutblank")}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue