This commit is contained in:
Percs 2024-07-16 17:42:21 -05:00
parent fa779017ad
commit d6dd1d4ca3
20 changed files with 363 additions and 379 deletions

View file

@ -1,19 +1,21 @@
navigator.serviceWorker
.register("./sw.js")
.then((reg) => {
reg.update();
});
navigator.serviceWorker.register("./sw.js").then((reg) => {
reg.update();
});
navigator.serviceWorker.ready.then((reg) => {
for (let i = 0; i < 20; i++) {
const thread = new SharedWorker($scramjet.config.thread, { name: "thread" + i });
for (let i = 0; i < 20; i++) {
const thread = new SharedWorker($scramjet.config.thread, {
name: "thread" + i,
});
reg.active.postMessage({
scramjet$type: "add",
handle: thread.port
}, [thread.port]);
}
reg.active.postMessage(
{
scramjet$type: "add",
handle: thread.port,
},
[thread.port]
);
}
});
const connection = new BareMux.BareMuxConnection("/baremux/worker.js");
@ -24,21 +26,21 @@ const col = css`
flex-direction: column;
`;
const store = $store(
{
url: "https://google.com",
wispurl: "wss://wisp.mercurywork.shop/",
bareurl:
(location.protocol === "https:" ? "https" : "http") +
"://" +
location.host +
"/bare/",
},
{ ident: "settings", backing: "localstorage", autosave: "auto" }
{
url: "https://google.com",
wispurl: "wss://wisp.mercurywork.shop/",
bareurl:
(location.protocol === "https:" ? "https" : "http") +
"://" +
location.host +
"/bare/",
},
{ ident: "settings", backing: "localstorage", autosave: "auto" }
);
connection.setTransport("/baremod/index.mjs", [store.bareurl]);
function App() {
this.urlencoded = "";
this.css = `
this.urlencoded = "";
this.css = `
width: 100%;
height: 100%;
color: #e0def4;
@ -97,7 +99,7 @@ function App() {
}
`;
return html`
return html`
<div>
<h1>Percury Unblocker</h1>
<p>surf the unblocked and mostly buggy web</p>
@ -121,5 +123,5 @@ function App() {
}
window.addEventListener("load", () => {
document.body.appendChild(h(App));
document.body.appendChild(h(App));
});