From 1cd064f94a68bbc6515b4de2cd3c3f9458589ddb Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sat, 10 Sep 2022 19:32:00 +0200 Subject: pref for popup image view --- client-web/source/helper.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'client-web/source/helper.ts') diff --git a/client-web/source/helper.ts b/client-web/source/helper.ts index 4075a0f..60ecf09 100644 --- a/client-web/source/helper.ts +++ b/client-web/source/helper.ts @@ -1,5 +1,7 @@ /// +import { PREFS } from "./preferences/mod.ts"; + const elem = (s: string) => document.createElement(s) interface Opts { class?: string[] | string, id?: string, src?: string, onclick?: () => void } @@ -60,7 +62,7 @@ export function image_view(url: string, opts?: Opts): HTMLElement { img.src = url img.alt = `Image (click to open)` img.addEventListener("click", () => { - window.open(url, "_blank", "noreferrer=true,noopener=true,popup=true") + window.open(url, "_blank", `noreferrer=true,noopener=true,popup=${PREFS.image_view_popup}`) }) return img } -- cgit v1.2.3-70-g09d2