From 6c15c907bf60d181b537bce8300685e5f5770f29 Mon Sep 17 00:00:00 2001 From: Svilen Markov <7613769+svilenmarkov@users.noreply.github.com> Date: Tue, 11 Jun 2024 00:17:25 +0100 Subject: [PATCH 1/2] Remove clock from preconfigured page --- docs/configuration.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/configuration.md b/docs/configuration.md index f547700..7d4669f 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -40,7 +40,6 @@ pages: columns: - size: small widgets: - - type: clock - type: calendar - type: rss From 3805f8b15647ac6950faab6b8ed1d94ebd83e2a9 Mon Sep 17 00:00:00 2001 From: dracarys18 Date: Wed, 3 Jul 2024 02:46:16 +0530 Subject: [PATCH 2/2] fix: allow custom bangs without an argument --- internal/assets/static/main.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/internal/assets/static/main.js b/internal/assets/static/main.js index 3e10b96..cc391e8 100644 --- a/internal/assets/static/main.js +++ b/internal/assets/static/main.js @@ -147,8 +147,7 @@ function setupSearchboxes() { query = input; searchUrlTemplate = defaultSearchUrl; } - - if (query.length == 0) { + if (query.length == 0 && currentBang == null) { return; } @@ -170,9 +169,13 @@ function setupSearchboxes() { } const handleInput = (event) => { - const value = event.target.value.trimStart(); - const words = value.split(" "); + const value = event.target.value.trim(); + if (value in bangsMap) { + changeCurrentBang(bangsMap[value]); + return; + } + const words = value.split(" "); if (words.length >= 2 && words[0] in bangsMap) { changeCurrentBang(bangsMap[words[0]]); return;