From d8bb73a81b6080906ce9221a4b3e53c0c0a7e873 Mon Sep 17 00:00:00 2001 From: DarioDarko Date: Thu, 23 Jan 2025 15:51:14 +0100 Subject: [PATCH] auto-remove trailing slash to avoid JSON error --- options.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/options.js b/options.js index e89d9c4..9a7a239 100644 --- a/options.js +++ b/options.js @@ -55,7 +55,7 @@ hostKeyEle.oninput = (event) => { } // Get the Chhoto URL host - const chhotoHost = hostKeyEle.value; + const chhotoHost = hostKeyEle.value.replace(/\/$/, ''); // Catch the exception from the URL constructor // (this always activates because as the user begins typing, the URL is invalid)