mirror of
https://github.com/NebulaServices/Nebula.git
synced 2025-05-17 05:20:01 -04:00
about blank mode
This commit is contained in:
parent
4f8f18f0ff
commit
bc73f5d3f3
4 changed files with 56 additions and 45 deletions
|
@ -81,33 +81,14 @@ export function ProxyFrame(props: { url: string }) {
|
|||
window.location.href = ProxiedUrl; // This is the hackiest workaround in the history of hacky workarounds
|
||||
}
|
||||
} else if (proxyMode == "aboutblank") {
|
||||
const newWindow = window.open("about:blank", "_blank");
|
||||
const newDocument = newWindow.document.open();
|
||||
newDocument.write(`
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
body, html
|
||||
{
|
||||
margin: 0; padding: 0; height: 100%; overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<iframe style="border: none; width: 100%; height: 100vh;" src="${
|
||||
window.location.origin + ProxiedUrl
|
||||
}"></iframe>
|
||||
</body>
|
||||
</html>
|
||||
`);
|
||||
newDocument.close();
|
||||
window.location.replace("/");
|
||||
if (!(ProxiedUrl == undefined)) {
|
||||
window.location.href = "/ab/" + encodeURIComponent(ProxiedUrl);
|
||||
}
|
||||
}
|
||||
if (!ProxiedUrl == undefined) {
|
||||
window.location.href = ProxiedUrl;
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<div class="h-screen w-screen bg-primary">
|
||||
<CloakedHead
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue