fix url generation for gh pages

This commit is contained in:
Janis
2023-11-12 18:41:12 +01:00
parent 1a5f0b8e6e
commit 87dd069dec

View File

@@ -19,12 +19,18 @@ export default function Generator() {
// Function to generate the output URL
function generateUrl() {
const url = new URL(window.location.href.replace("/#/generate", ""));
const url = new URL(window.location.href);
url.hash = "";
url.searchParams.set("remoteAppPort", remoteAppPort.toString());
url.searchParams.set("showChannelName", showChannelName.toString());
url.searchParams.set("hideNonTalking", hideNonTalking.toString());
url.searchParams.set("clientLimit", clientLimit.toString());
if (url.hostname === "dertyp7.github.io") {
url.pathname = url.pathname + "ts5-obs-overlay/";
}
setOutputUrl(url.toString());
}