diff --git a/scripts/src/lib/Documentation.svelte b/scripts/src/lib/Documentation.svelte index d92268c8..eca0b31a 100644 --- a/scripts/src/lib/Documentation.svelte +++ b/scripts/src/lib/Documentation.svelte @@ -5,13 +5,17 @@ getLoaderVersions, } from "./Api"; - function handleSelectChange(event: any, project: any) { - const selectedVersion = event.target.value; + let anchor: HTMLAnchorElement; + let url: string; - if (selectedVersion.includes("Select")) return; + function handleSelectChange(event: any, project: any) { + const selectedVersion = event.target.value; - window.open(`https://maven.fabricmc.net/docs/${project.prefix}${selectedVersion}/`, '_blank'); - } + if (selectedVersion.includes("Select")) return; + + url = `https://maven.fabricmc.net/docs/${project.prefix}${selectedVersion}/`; + anchor.click(); + } function filterAndSortVersions( versions: string[], @@ -86,13 +90,14 @@ {:then data} {#each data as project}
Error: {error.message}