set default wisp server for static build

This commit is contained in:
velzie 2024-10-12 19:34:02 -04:00
parent f4bbc4db2c
commit 48fd39eca1
4 changed files with 10 additions and 22 deletions

View file

@ -10,22 +10,6 @@ const scramjet = new ScramjetController({
scramjet.init("./sw.js");
// navigator.serviceWorker.ready.then((reg) => {
// 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]
// );
// }
// });
const connection = new BareMux.BareMuxConnection("/baremux/worker.js");
const flex = css`
display: flex;
@ -38,15 +22,17 @@ const store = $store(
{
url: "https://google.com",
wispurl:
_CONFIG?.wispurl ||
(location.protocol === "https:" ? "wss" : "ws") +
"://" +
location.host +
"/wisp/",
"://" +
location.host +
"/wisp/",
bareurl:
_CONFIG?.bareurl ||
(location.protocol === "https:" ? "https" : "http") +
"://" +
location.host +
"/bare/",
"://" +
location.host +
"/bare/",
proxy: "",
},
{ ident: "settings", backing: "localstorage", autosave: "auto" }