diff --git a/docs/configuration.md b/docs/configuration.md index 2dffb2e..eaec5d0 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -40,7 +40,6 @@ pages: columns: - size: small widgets: - - type: clock - type: calendar - type: rss diff --git a/internal/assets/static/main.js b/internal/assets/static/main.js index e8a200f..c8f7324 100644 --- a/internal/assets/static/main.js +++ b/internal/assets/static/main.js @@ -148,8 +148,7 @@ function setupSearchBoxes() { query = input; searchUrlTemplate = defaultSearchUrl; } - - if (query.length == 0) { + if (query.length == 0 && currentBang == null) { return; } @@ -171,9 +170,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;