Skip to content

Commit

Permalink
another potential fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pyro committed Mar 22, 2024
1 parent 61837ca commit 31ef141
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/js/pframe.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ const plugins = [
];

window.addEventListener("load", async function () {
await registerSW();
let wispUrl = (location.protocol === "https:" ? "wss" : "ws") + "://" + location.host + "/wisp/";
BareMux.SetTransport("EpxMod.EpoxyClient", { wisp: wispUrl });
await registerSW();

const searchField = document.getElementById("searchField");
const searchButton = document.getElementById("searchButton");
const urlParams = new URLSearchParams(window.location.search);
Expand All @@ -32,6 +33,7 @@ window.addEventListener("load", async function () {
this.window.location.href = "/pframe.html";
} else {
pframe.src = __uv$config.prefix + __uv$config.encodeUrl(this.localStorage.getItem("pframeSrc"));
this.window.location.reload();
let nums = JSON.stringify(localStorage["installedApps"]);
if (nums.includes("Adblocker")) {
let script = pframeDocument.createElement("script");
Expand Down

0 comments on commit 31ef141

Please sign in to comment.