From e7f6ef0e9eaee1437d6b91a05bd7e93bd258567c Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Thu, 9 Jun 2022 21:52:20 +0200 Subject: [PATCH] only request shortened link if link shortener is configured --- frontend/index.html | 2 +- frontend/src/index.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/index.html b/frontend/index.html index 528e429..7837121 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -110,7 +110,7 @@

- +
diff --git a/frontend/src/index.ts b/frontend/src/index.ts index a4a7054..6821d9b 100644 --- a/frontend/src/index.ts +++ b/frontend/src/index.ts @@ -287,6 +287,7 @@ function getUploadParams(): UploadParams { } function onConfig(config: Config) { + let cbShortURL = document.getElementById("shorten-link") as HTMLInputElement; let selServers = document.getElementById("servers") as HTMLSelectElement; let divServers = document.getElementById("config-servers"); @@ -315,6 +316,8 @@ function onConfig(config: Config) { if (config.features.short_url) { let divShorten = document.getElementById("config-shorten"); divShorten.classList.remove("d-none"); + + cbShortURL.click(); } if (config.features.notify_mail) {