From 63072972f77048e3659cfb7b442433d23967d03e Mon Sep 17 00:00:00 2001 From: Miroma <136986257+its-miroma@users.noreply.github.com> Date: Fri, 31 May 2024 08:53:09 +0200 Subject: [PATCH] Fix Java Docs for browsers that block popups --- scripts/src/lib/Documentation.svelte | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/scripts/src/lib/Documentation.svelte b/scripts/src/lib/Documentation.svelte index d92268c8..f6912103 100644 --- a/scripts/src/lib/Documentation.svelte +++ b/scripts/src/lib/Documentation.svelte @@ -5,13 +5,14 @@ getLoaderVersions, } from "./Api"; - function handleSelectChange(event: any, project: any) { - const selectedVersion = event.target.value; + function handleSelectChange(event: any, project: any) { + const selectedVersion = event.target.value; - if (selectedVersion.includes("Select")) return; + if (selectedVersion.includes("Select")) return; - window.open(`https://maven.fabricmc.net/docs/${project.prefix}${selectedVersion}/`, '_blank'); - } + url = `https://maven.fabricmc.net/docs/${project.prefix}${selectedVersion}/`; + anchor.click(); + } function filterAndSortVersions( versions: string[], @@ -86,13 +87,14 @@ {:then data} {#each data as project}
Error: {error.message}