Fix proxy validation script; minor cleanup

This commit is contained in:
00Fjongl 2024-07-20 02:38:22 -05:00
parent 2915d36a64
commit 2009b268fe
2 changed files with 3 additions and 12 deletions

View file

@ -11,14 +11,14 @@ transports = {
bare: "/baremux/index.mjs" bare: "/baremux/index.mjs"
}, },
// Copied and pasted here from csel.js in case csel.js fails to load. // Copied and pasted here from csel.js in case csel.js is not loaded.
// Sets the default transport mode based on the browser. Firefox is not // Sets the default transport mode based on the browser. Firefox is not
// supported by epoxy yet, which is why this is implemented. // supported by epoxy yet, which is why this is implemented.
defaultMode = /(?:Chrome|AppleWebKit)\//.test(navigator.userAgent) defaultMode2 = /(?:Chrome|AppleWebKit)\//.test(navigator.userAgent)
? "epoxy" ? "epoxy"
: "libcurl"; : "libcurl";
transports.default = transports[defaultMode]; transports.default = transports[defaultMode2];
// Prevent the transports object from being edited. // Prevent the transports object from being edited.
Object.freeze(transports); Object.freeze(transports);

View file

@ -36,15 +36,6 @@
<!-- IMPORTANT-HUCOOKINGINSERT-DONOTDELETE --> <!-- IMPORTANT-HUCOOKINGINSERT-DONOTDELETE -->
<iframe id="frame" allow="fullscreen" autofocus></iframe> <iframe id="frame" allow="fullscreen" autofocus></iframe>
<script> <script>
var search = decodeURIComponent(window.location.search)
.substring(1)
.split("&");
var queries = {};
for (var i = 0; i < search.length; i++) {
var p = search[i].split("=");
queries[p[0]] = p[1];
}
document.getElementById("frame").src = localStorage.getItem("huframesrc"); document.getElementById("frame").src = localStorage.getItem("huframesrc");
</script> </script>
<script src="assets/js/csel.js"></script> <script src="assets/js/csel.js"></script>