feat: add default search engine option

This commit is contained in:
frosty
2026-08-12 20:21:12 -04:00
parent 10d44e7ff5
commit a20a9e8878
8 changed files with 96 additions and 7 deletions

View File

@@ -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++) {