Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
QuiteAFancyEmerald committed Jul 17, 2024
2 parents 7be3f37 + aed0911 commit 760a3e6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
6 changes: 3 additions & 3 deletions proxyServiceValidator.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,10 @@ xx xx
const waitForDocument = new Promise(resolve => {
document.documentElement.appendChild(exampleIFrame);
exampleIFrame.addEventListener("load", () => {
result = exampleIFrame.contentWindow.document.title === website.title;
resolve();
result = exampleIFrame.contentWindow.document.title === website.title;
resolve();
});
});
});
exampleIFrame.src = url;
exampleIFrame.style.display = "none";
await waitForDocument;
Expand Down
7 changes: 7 additions & 0 deletions views/assets/css/styles-1644738239.css
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,8 @@ details[open] summary {
}

.navbar .dropdown-settings {
display: none;
pointer-events: none;
position: fixed;
top: 0;
left: 0;
Expand All @@ -425,6 +427,7 @@ details[open] summary {
}

.settings-content {
pointer-events: auto;
background-color: var(--nord0);
border: 1px solid var(--nord3);
border-radius: 10px;
Expand All @@ -434,6 +437,10 @@ details[open] summary {
text-align: center;
}

.dropdown-parent:focus-within .dropdown-settings {
display: flex; /* Flexbox to center content */
}

.dropdown-parent:focus-within .dropdown-child {
display: block;
}
Expand Down
4 changes: 2 additions & 2 deletions views/assets/js/register-sw.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const stockSW = "/uv/sw.js";
const swAllowedHostnames = ["localhost", "127.0.0.1"];
const connection = new BareMux.BareMuxConnection("/baremux/worker.js");
const wispUrl = (location.protocol === "https:" ? "wss" : "ws") + "://" + location.host + "/wisp/";

async function registerSW() {
if (!navigator.serviceWorker) {
Expand All @@ -13,13 +14,12 @@ async function registerSW() {
throw new Error("Your browser doesn't support service workers.");
}

let wispUrl = (location.protocol === "https:" ? "wss" : "ws") + "://" + location.host + "/wisp/";
await connection.setTransport("/epoxy/index.mjs", [{ wisp: wispUrl }]);
await navigator.serviceWorker.register(stockSW);
}

async function setupTransportOnLoad() {
const conn = new BareMuxConnection("/baremux/worker.js");
const conn = new BareMux.BareMuxConnection("/baremux/worker.js");
if (await conn.getTransport() !== "/baremux/module.js") {
await conn.setTransport("/baremux/module.js", [{ wisp: wispUrl }]);
}
Expand Down

0 comments on commit 760a3e6

Please sign in to comment.