From a20a9e8878ab6708bd3e3ecb4b1cee8728436dd0 Mon Sep 17 00:00:00 2001 From: frosty Date: Wed, 12 Aug 2026 20:21:12 -0400 Subject: feat: add default search engine option --- src/Utility/Utility.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/Utility/Utility.c') diff --git a/src/Utility/Utility.c b/src/Utility/Utility.c index 5183efe..35fc491 100644 --- a/src/Utility/Utility.c +++ b/src/Utility/Utility.c @@ -217,6 +217,15 @@ int user_engines_contains(const char *engine_id, char **ids, int count) { return 0; } +char *get_default_search_engine(void) { + char *cookie = get_cookie("default_engine"); + if (cookie && (strcmp(cookie, "all") == 0 || is_engine_id_enabled(cookie))) + return cookie; + + free(cookie); + return strdup("all"); +} + void free_string_matrix(char ***matrix, int *inner_counts, int row_count) { if (matrix) { for (int i = 0; i < row_count; i++) { -- cgit v1.3