mirror of
https://github.com/QuiteAFancyEmerald/Holy-Unblocker.git
synced 2025-05-13 12:00:02 -04:00
fix things. libreddit, searxng coming soon ™️
This commit is contained in:
parent
dc8b8eef07
commit
f059c83596
13 changed files with 78 additions and 75 deletions
6
.gitmodules
vendored
6
.gitmodules
vendored
|
@ -1,3 +1,7 @@
|
||||||
[submodule "views/archive"]
|
[submodule "views/archive"]
|
||||||
path = views/archive
|
path = views/archive
|
||||||
url = https://github.com/QuiteAFancyEmerald/HU-Archive.git
|
url = https://github.com/QuiteAFancyEmerald/HU-Archive.git
|
||||||
|
|
||||||
|
[submodule "views/archive/osu"]
|
||||||
|
path = views/archive/osu
|
||||||
|
url = https://github.com/BlaNKtext/webosu.git
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"title": "HU OSS",
|
"title": "HU OSS",
|
||||||
"port": "8080",
|
"port": "8081",
|
||||||
"ssl": false,
|
"ssl": false,
|
||||||
"ws": true,
|
"ws": true,
|
||||||
"prefix": "/service/",
|
"prefix": "/service/",
|
||||||
|
|
|
@ -22,6 +22,12 @@ const router = express.Router();
|
||||||
const bare = createBareServer('/bare/');
|
const bare = createBareServer('/bare/');
|
||||||
const rh = createRammerhead();
|
const rh = createRammerhead();
|
||||||
|
|
||||||
|
app.get('/baremux/bare.cjs', (req, res) => {
|
||||||
|
res.setHeader('Content-Type', 'application/javascript');
|
||||||
|
res.sendFile(path.join(baremuxPath, 'bare.cjs'));
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
const rammerheadScopes = [
|
const rammerheadScopes = [
|
||||||
'/rammerhead.js',
|
'/rammerhead.js',
|
||||||
'/hammerhead.js',
|
'/hammerhead.js',
|
||||||
|
|
|
@ -59,9 +59,6 @@ const xor = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const stockSW = "/uv/sw.js";
|
|
||||||
const swAllowedHostnames = ["localhost", "127.0.0.1"];
|
|
||||||
|
|
||||||
/* To use:
|
/* To use:
|
||||||
* goProx.proxy(url-string, stealth-boolean-optional)
|
* goProx.proxy(url-string, stealth-boolean-optional)
|
||||||
*
|
*
|
||||||
|
@ -268,18 +265,23 @@ async function RammerheadEncode(baseUrl) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function uvUrl(url) {
|
||||||
|
return location.origin + __uv$config.prefix + __uv$config.encodeUrl(url);
|
||||||
|
};
|
||||||
|
|
||||||
window.goProx = {
|
window.goProx = {
|
||||||
|
// `location.protocol + "//" + getDomain()` more like `location.origin`
|
||||||
ultraviolet: function (url, stealth) {
|
ultraviolet: function (url, stealth) {
|
||||||
setAuthCookie("__cor_auth=1", false);
|
setAuthCookie("__cor_auth=1", false);
|
||||||
goToUrl(location.protocol + "//" + getDomain() + __uv$config.prefix + __uv$config.encodeUrl(omnibox(url)), stealth);
|
goToUrl(location.origin + __uv$config.prefix + __uv$config.encodeUrl(omnibox(url)), stealth);
|
||||||
},
|
},
|
||||||
womginx: function (url, stealth) {
|
womginx: function (url, stealth) {
|
||||||
setAuthCookie("wgauth=yes", false);
|
setAuthCookie("wgauth=yes", false);
|
||||||
goToUrl(location.protocol + "//a." + getDomain() + "/main/" + omnibox(url), stealth);
|
goToUrl(location.protocol + "//a." + getDomain() + "/main/" + omnibox(url), stealth);
|
||||||
},
|
},
|
||||||
rammerhead: async function (url, stealth) {
|
rammerhead: async function (url, stealth) {
|
||||||
goToUrl(location.protocol + "//" + getDomain() + await RammerheadEncode(omnibox(url)), stealth);
|
goToUrl(location.origin + await RammerheadEncode(omnibox(url)), stealth);
|
||||||
}, // i spent like 20 mins just to realize i had to make it async
|
},
|
||||||
searx: function (stealth) {
|
searx: function (stealth) {
|
||||||
setAuthCookie("oldsmobile=badcar", false);
|
setAuthCookie("oldsmobile=badcar", false);
|
||||||
goToUrl(location.protocol + "//c." + getDomain() + "/engine/", stealth);
|
goToUrl(location.protocol + "//c." + getDomain() + "/engine/", stealth);
|
||||||
|
@ -293,50 +295,50 @@ window.goProx = {
|
||||||
},
|
},
|
||||||
osu: function (stealth) {
|
osu: function (stealth) {
|
||||||
setAuthCookie("osauth=true", false);
|
setAuthCookie("osauth=true", false);
|
||||||
goToUrl(location.protocol + "//osu." + getDomain() + "/index.html", stealth);
|
goToUrl(location.origin + '/archive/osu', stealth);
|
||||||
},
|
},
|
||||||
mcnow: function (stealth) {
|
mcnow: function (stealth) {
|
||||||
setAuthCookie("__cor_auth=1", false);
|
setAuthCookie("__cor_auth=1", false);
|
||||||
goToUrl(location.protocol + "//" + getDomain() + __uv$config.prefix + __uv$config.encodeUrl('https://now.gg/play/mojang/2534/minecraft-trial'), stealth);
|
goToUrl(location.origin + __uv$config.prefix + __uv$config.encodeUrl('https://now.gg/play/mojang/2534/minecraft-trial'), stealth);
|
||||||
},
|
},
|
||||||
glife: function (stealth) {
|
glife: function (stealth) {
|
||||||
setAuthCookie("__cor_auth=1", false);
|
setAuthCookie("__cor_auth=1", false);
|
||||||
goToUrl(location.protocol + "//" + getDomain() + __uv$config.prefix + __uv$config.encodeUrl('https://now.gg/play/lunime/5767/gacha-life'), stealth);
|
goToUrl(location.origin + __uv$config.prefix + __uv$config.encodeUrl('https://now.gg/play/lunime/5767/gacha-life'), stealth);
|
||||||
},
|
},
|
||||||
roblox: function (stealth) {
|
roblox: function (stealth) {
|
||||||
setAuthCookie("__cor_auth=1", false);
|
setAuthCookie("__cor_auth=1", false);
|
||||||
goToUrl(location.protocol + "//" + getDomain() + __uv$config.prefix + __uv$config.encodeUrl('https://now.gg/play/roblox-corporation/5349/roblox'), stealth);
|
goToUrl(location.origin + __uv$config.prefix + __uv$config.encodeUrl('https://now.gg/play/roblox-corporation/5349/roblox'), stealth);
|
||||||
},
|
},
|
||||||
amongus: function (stealth) {
|
amongus: function (stealth) {
|
||||||
setAuthCookie("__cor_auth=1", false);
|
setAuthCookie("__cor_auth=1", false);
|
||||||
goToUrl(location.protocol + "//" + getDomain() + __uv$config.prefix + __uv$config.encodeUrl('https://now.gg/play/innersloth-llc/4047/among-us'), stealth);
|
goToUrl(location.origin + __uv$config.prefix + __uv$config.encodeUrl('https://now.gg/play/innersloth-llc/4047/among-us'), stealth);
|
||||||
},
|
},
|
||||||
pubg: function (stealth) {
|
pubg: function (stealth) {
|
||||||
setAuthCookie("__cor_auth=1", false);
|
setAuthCookie("__cor_auth=1", false);
|
||||||
goToUrl(location.protocol + "//" + getDomain() + __uv$config.prefix + __uv$config.encodeUrl('https://now.gg/play/proxima-beta/2609/pubg-mobile-resistance'), stealth);
|
goToUrl(location.origin + __uv$config.prefix + __uv$config.encodeUrl('https://now.gg/play/proxima-beta/2609/pubg-mobile-resistance'), stealth);
|
||||||
},
|
},
|
||||||
train: function (stealth) {
|
train: function (stealth) {
|
||||||
setAuthCookie("wgauth=yes", false);
|
setAuthCookie("wgauth=yes", false);
|
||||||
goToUrl(location.protocol + "//" + getDomain() + __uv$config.prefix + __uv$config.encodeUrl('v6p9' + 'd9t4.ssl.hw' + 'cdn.net/html/1970' + '387/index.ht' + 'ml'), stealth);
|
goToUrl(location.origin + __uv$config.prefix + __uv$config.encodeUrl('v6p9' + 'd9t4.ssl.hw' + 'cdn.net/html/1970' + '387/index.ht' + 'ml'), stealth);
|
||||||
},
|
},
|
||||||
village: function (stealth) {
|
village: function (stealth) {
|
||||||
setAuthCookie("wgauth=yes", false);
|
setAuthCookie("wgauth=yes", false);
|
||||||
goToUrl(location.protocol + "//" + getDomain() + __uv$config.prefix + __uv$config.encodeUrl('v6p' + '9d9t4.ss' + 'l.hwcd' + 'n.net/html/3' + '626475/index.html'), stealth);
|
goToUrl(location.origin + __uv$config.prefix + __uv$config.encodeUrl('v6p' + '9d9t4.ss' + 'l.hwcd' + 'n.net/html/3' + '626475/index.html'), stealth);
|
||||||
},
|
},
|
||||||
prison: function (stealth) {
|
prison: function (stealth) {
|
||||||
setAuthCookie("wgauth=yes", false);
|
setAuthCookie("wgauth=yes", false);
|
||||||
goToUrl(location.protocol + "//" + getDomain() + __uv$config.prefix + __uv$config.encodeUrl('v6p' + '9d9t4.ssl.hwc' + 'dn.net/h' + 'tml/364' + '7099/index.html'), stealth);
|
goToUrl(location.origin + __uv$config.prefix + __uv$config.encodeUrl('v6p' + '9d9t4.ssl.hwc' + 'dn.net/h' + 'tml/364' + '7099/index.html'), stealth);
|
||||||
},
|
},
|
||||||
rpg: function (stealth) {
|
rpg: function (stealth) {
|
||||||
setAuthCookie("wgauth=yes", false);
|
setAuthCookie("wgauth=yes", false);
|
||||||
goToUrl(location.protocol + "//" + getDomain() + __uv$config.prefix + __uv$config.encodeUrl('v6p9d9' + 't4.ssl.hwc' + 'dn.net/html/347' + '0524/Die%20in%20the%20Du' + 'ngeon%201.1%20[WEB]/index.html'), stealth);
|
goToUrl(location.origin + __uv$config.prefix + __uv$config.encodeUrl('v6p9d9' + 't4.ssl.hwc' + 'dn.net/html/347' + '0524/Die%20in%20the%20Du' + 'ngeon%201.1%20[WEB]/index.html'), stealth);
|
||||||
},
|
},
|
||||||
speed: function (stealth) {
|
speed: function (stealth) {
|
||||||
setAuthCookie("wgauth=yes", false);
|
setAuthCookie("wgauth=yes", false);
|
||||||
goToUrl(location.protocol + "//" + getDomain() + __uv$config.prefix + __uv$config.encodeUrl('v6p9' + 'd9t4.ssl.hw' + 'cdn.net/html/36' + '28752/index.html'), stealth);
|
goToUrl(location.origin + __uv$config.prefix + __uv$config.encodeUrl('v6p9' + 'd9t4.ssl.hw' + 'cdn.net/html/36' + '28752/index.html'), stealth);
|
||||||
},
|
},
|
||||||
heli: function (stealth) {
|
heli: function (stealth) {
|
||||||
setAuthCookie("wgauth=yes", false);
|
setAuthCookie("wgauth=yes", false);
|
||||||
goToUrl(location.protocol + "//" + __uv$config.prefix + __uv$config.encodeUrl('v6p9d' + '9t4.ssl.h' + 'wcdn.net/ht' + 'ml/3605' + '579/Helo%20Sto' + 'rm/index.html'), stealth);
|
goToUrl(location.origin + __uv$config.prefix + __uv$config.encodeUrl('v6p9d' + '9t4.ssl.h' + 'wcdn.net/ht' + 'ml/3605' + '579/Helo%20Sto' + 'rm/index.html'), stealth);
|
||||||
}
|
}
|
||||||
};
|
};
|
|
@ -1,16 +1,21 @@
|
||||||
|
const stockSW = "/uv/sw.js";
|
||||||
|
const swAllowedHostnames = ["localhost", "127.0.0.1"];
|
||||||
|
|
||||||
async function registerSW() {
|
async function registerSW() {
|
||||||
if (!navigator.serviceWorker) {
|
if (!navigator.serviceWorker) {
|
||||||
if (
|
if (
|
||||||
location.protocol !== "https:" &&
|
location.protocol !== "https:" &&
|
||||||
!swAllowedHostnames.includes(location.hostname)
|
!swAllowedHostnames.includes(location.hostname)
|
||||||
)
|
)
|
||||||
throw new Error("Service workers cannot be registered without https.");
|
throw new Error("Service workers cannot be registered without https.");
|
||||||
|
|
||||||
throw new Error("Your browser doesn't support service workers.");
|
throw new Error("Your browser doesn't support service workers.");
|
||||||
}
|
}
|
||||||
|
|
||||||
await navigator.serviceWorker.register(stockSW);
|
await navigator.serviceWorker.register(stockSW);
|
||||||
|
|
||||||
let wispUrl = (location.protocol === "https:" ? "wss" : "ws") + "://" + location.host + "/wisp/";
|
let wispUrl = (location.protocol === "https:" ? "wss" : "ws") + "://" + location.host + "/wisp/";
|
||||||
await BareMux.SetTransport("EpxMod.EpoxyClient", { wisp: wispUrl });
|
await BareMux.SetTransport("EpxMod.EpoxyClient", { wisp: wispUrl });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
registerSW();
|
|
@ -17,7 +17,6 @@
|
||||||
<script src="/uv/uv.bundle.js" defer></script>
|
<script src="/uv/uv.bundle.js" defer></script>
|
||||||
<script src="/uv/uv.config.js" defer></script>
|
<script src="/uv/uv.config.js" defer></script>
|
||||||
<script src="/assets/js/register-sw.js" defer></script>
|
<script src="/assets/js/register-sw.js" defer></script>
|
||||||
<script src="/assets/js/search.js" defer></script>
|
|
||||||
<!-- Arc widget causes lag on some gams, so it is created by js below if &nolag isn't specified in the querystring -->
|
<!-- Arc widget causes lag on some gams, so it is created by js below if &nolag isn't specified in the querystring -->
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,11 @@
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
<link rel="dns-prefetch" href="https://fonts.googleapis.com">
|
<link rel="dns-prefetch" href="https://fonts.googleapis.com">
|
||||||
<link rel="stylesheet" href="assets/css/styles.css">
|
<link rel="stylesheet" href="assets/css/styles.css">
|
||||||
|
<script src="/baremux/bare.cjs" defer></script>
|
||||||
|
<script src="/epoxy/index.js" defer></script>
|
||||||
|
<script src="/uv/uv.bundle.js" defer></script>
|
||||||
|
<script src="/uv/uv.config.js" defer></script>
|
||||||
|
<script src="/assets/js/register-sw.js" defer></script>
|
||||||
<script src="
|
<script src="
|
||||||
https://cdn.jsdelivr.net/npm/tsparticles@3.5/tsparticles.bundle.min.js
|
https://cdn.jsdelivr.net/npm/tsparticles@3.5/tsparticles.bundle.min.js
|
||||||
"></script>
|
"></script>
|
||||||
|
|
|
@ -18,6 +18,11 @@
|
||||||
<script src="
|
<script src="
|
||||||
https://cdn.jsdelivr.net/npm/tsparticles@3.5/tsparticles.bundle.min.js
|
https://cdn.jsdelivr.net/npm/tsparticles@3.5/tsparticles.bundle.min.js
|
||||||
"></script>
|
"></script>
|
||||||
|
<script src="/baremux/bare.cjs" defer></script>
|
||||||
|
<script src="/epoxy/index.js" defer></script>
|
||||||
|
<script src="/uv/uv.bundle.js" defer></script>
|
||||||
|
<script src="/uv/uv.config.js" defer></script>
|
||||||
|
<script src="/assets/js/register-sw.js" defer></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
<script src="/uv/uv.bundle.js" defer></script>
|
<script src="/uv/uv.bundle.js" defer></script>
|
||||||
<script src="/uv/uv.config.js" defer></script>
|
<script src="/uv/uv.config.js" defer></script>
|
||||||
<script src="/assets/js/register-sw.js" defer></script>
|
<script src="/assets/js/register-sw.js" defer></script>
|
||||||
<script src="/assets/js/search.js" defer></script>
|
|
||||||
<script src="
|
<script src="
|
||||||
https://cdn.jsdelivr.net/npm/tsparticles@3.5/tsparticles.bundle.min.js
|
https://cdn.jsdelivr.net/npm/tsparticles@3.5/tsparticles.bundle.min.js
|
||||||
"></script>
|
"></script>
|
||||||
|
@ -64,8 +63,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<iframe style="display: none;" id="hu-frame"></iframe>
|
|
||||||
<div id="footer" class="fullwidth"><!--FOOTER--></div>
|
<div id="footer" class="fullwidth"><!--FOOTER--></div>
|
||||||
|
<script src="assets/js/common.js"></script>
|
||||||
<script src="assets/js/links.js"></script>
|
<script src="assets/js/links.js"></script>
|
||||||
<script defer="defer" src="assets/js/particlesjs/particles.js"></script>
|
<script defer="defer" src="assets/js/particlesjs/particles.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -12,6 +12,11 @@
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
<link rel="dns-prefetch" href="https://fonts.googleapis.com">
|
<link rel="dns-prefetch" href="https://fonts.googleapis.com">
|
||||||
<link rel="stylesheet" href="assets/css/styles.css">
|
<link rel="stylesheet" href="assets/css/styles.css">
|
||||||
|
<script src="/baremux/bare.cjs" defer></script>
|
||||||
|
<script src="/epoxy/index.js" defer></script>
|
||||||
|
<script src="/uv/uv.bundle.js" defer></script>
|
||||||
|
<script src="/uv/uv.config.js" defer></script>
|
||||||
|
<script src="/assets/js/register-sw.js" defer></script>
|
||||||
<script src="
|
<script src="
|
||||||
https://cdn.jsdelivr.net/npm/tsparticles@3.5/tsparticles.bundle.min.js
|
https://cdn.jsdelivr.net/npm/tsparticles@3.5/tsparticles.bundle.min.js
|
||||||
"></script>
|
"></script>
|
||||||
|
@ -46,12 +51,6 @@
|
||||||
</div>
|
</div>
|
||||||
<div id="footer" class="fullwidth"><!--FOOTER--></div>
|
<div id="footer" class="fullwidth"><!--FOOTER--></div>
|
||||||
<!-- IMPORTANT-HUCOOKINGINSERT-DONOTDELETE -->
|
<!-- IMPORTANT-HUCOOKINGINSERT-DONOTDELETE -->
|
||||||
<script src="uv/uv.bundle.js"></script>
|
|
||||||
<script src="uv/uv.config.js"></script>
|
|
||||||
<script src="assets/js/register-sw.js"></script>
|
|
||||||
<script>
|
|
||||||
registerSW();
|
|
||||||
</script>
|
|
||||||
<script src="assets/js/common.js"></script>
|
<script src="assets/js/common.js"></script>
|
||||||
<script defer="defer" src="assets/js/particlesjs/particles.js"></script>
|
<script defer="defer" src="assets/js/particlesjs/particles.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -15,6 +15,11 @@
|
||||||
<script src="
|
<script src="
|
||||||
https://cdn.jsdelivr.net/npm/tsparticles@3.5/tsparticles.bundle.min.js
|
https://cdn.jsdelivr.net/npm/tsparticles@3.5/tsparticles.bundle.min.js
|
||||||
"></script>
|
"></script>
|
||||||
|
<script src="/baremux/bare.cjs" defer></script>
|
||||||
|
<script src="/epoxy/index.js" defer></script>
|
||||||
|
<script src="/uv/uv.bundle.js" defer></script>
|
||||||
|
<script src="/uv/uv.config.js" defer></script>
|
||||||
|
<script src="/assets/js/register-sw.js" defer></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
@ -45,12 +50,6 @@
|
||||||
</div>
|
</div>
|
||||||
<div id="footer" class="fullwidth"><!--FOOTER--></div>
|
<div id="footer" class="fullwidth"><!--FOOTER--></div>
|
||||||
<!-- IMPORTANT-HUCOOKINGINSERT-DONOTDELETE -->
|
<!-- IMPORTANT-HUCOOKINGINSERT-DONOTDELETE -->
|
||||||
<script src="uv/uv.bundle.js"></script>
|
|
||||||
<script src="uv/uv.config.js"></script>
|
|
||||||
<script src="assets/js/register-sw.js"></script>
|
|
||||||
<script>
|
|
||||||
registerSW();
|
|
||||||
</script>
|
|
||||||
<script src="assets/js/common.js"></script>
|
<script src="assets/js/common.js"></script>
|
||||||
<script defer="defer" src="assets/js/particlesjs/particles.js"></script>
|
<script defer="defer" src="assets/js/particlesjs/particles.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -15,6 +15,11 @@
|
||||||
<script src="
|
<script src="
|
||||||
https://cdn.jsdelivr.net/npm/tsparticles@3.5/tsparticles.bundle.min.js
|
https://cdn.jsdelivr.net/npm/tsparticles@3.5/tsparticles.bundle.min.js
|
||||||
"></script>
|
"></script>
|
||||||
|
<script src="/baremux/bare.cjs" defer></script>
|
||||||
|
<script src="/epoxy/index.js" defer></script>
|
||||||
|
<script src="/uv/uv.bundle.js" defer></script>
|
||||||
|
<script src="/uv/uv.config.js" defer></script>
|
||||||
|
<script src="/assets/js/register-sw.js" defer></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
@ -45,12 +50,6 @@
|
||||||
</div>
|
</div>
|
||||||
<div id="footer" class="fullwidth"><!--FOOTER--></div>
|
<div id="footer" class="fullwidth"><!--FOOTER--></div>
|
||||||
<!-- IMPORTANT-HUCOOKINGINSERT-DONOTDELETE -->
|
<!-- IMPORTANT-HUCOOKINGINSERT-DONOTDELETE -->
|
||||||
<script src="uv/uv.bundle.js"></script>
|
|
||||||
<script src="uv/uv.config.js"></script>
|
|
||||||
<script src="assets/js/register-sw.js"></script>
|
|
||||||
<script>
|
|
||||||
registerSW();
|
|
||||||
</script>
|
|
||||||
<script src="assets/js/common.js"></script>
|
<script src="assets/js/common.js"></script>
|
||||||
<script defer="defer" src="assets/js/particlesjs/particles.js"></script>
|
<script defer="defer" src="assets/js/particlesjs/particles.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -75,25 +75,6 @@
|
||||||
<script defer="defer" src="assets/js/particlesjs/particles.js"></script>
|
<script defer="defer" src="assets/js/particlesjs/particles.js"></script>
|
||||||
<script>
|
<script>
|
||||||
prSet("ultraviolet");
|
prSet("ultraviolet");
|
||||||
|
|
||||||
async function registerSW() {
|
|
||||||
if (!navigator.serviceWorker) {
|
|
||||||
if (
|
|
||||||
location.protocol !== "https:" &&
|
|
||||||
!swAllowedHostnames.includes(location.hostname)
|
|
||||||
)
|
|
||||||
throw new Error("Service workers cannot be registered without https.");
|
|
||||||
|
|
||||||
throw new Error("Your browser doesn't support service workers.");
|
|
||||||
}
|
|
||||||
|
|
||||||
await navigator.serviceWorker.register(stockSW);
|
|
||||||
|
|
||||||
let wispUrl = (location.protocol === "https:" ? "wss" : "ws") + "://" + location.host + "/wisp/";
|
|
||||||
await BareMux.SetTransport("EpxMod.EpoxyClient", { wisp: wispUrl });
|
|
||||||
}
|
|
||||||
|
|
||||||
registerSW();
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue