diff --git a/src/Components/Embedding.svelte b/src/Components/Embedding.svelte index 934b14e..25c171b 100644 --- a/src/Components/Embedding.svelte +++ b/src/Components/Embedding.svelte @@ -168,7 +168,7 @@ import { peeTarget } from "../utils"; export let inhibitExpand: boolean = false; export async function bepis(ev: MouseEvent) { - dispatch("click"); + dispatch("click", ev); if (inhibitExpand) return; if ($appState.isCatalog) return; diff --git a/src/Components/HydrusSearch.svelte b/src/Components/HydrusSearch.svelte index ecbe357..ba168c2 100644 --- a/src/Components/HydrusSearch.svelte +++ b/src/Components/HydrusSearch.svelte @@ -40,6 +40,12 @@ onMount(() => { return update(); }); + + const handleEv = (ev: CustomEvent, ef: EmbeddedFile) => { + if (ev.detail.button == 0) { + return addToEmbeds(ef); + } + };
@@ -72,7 +78,7 @@
{#each maps as map (map[0])} addToEmbeds(map[1])} + on:click={(ev) => handleEv(ev, map[1])} inhibitExpand={true} id={"only"} file={map[1]}