rmountjoy92 / DashMachine

Another web application bookmark dashboard, with fun features.
GNU General Public License v3.0
1.24k stars 119 forks source link

[Enhancement] query to a configurable search engine when no card is found #184

Open goosmaster opened 4 years ago

goosmaster commented 4 years ago

What about adding a configurable search engine integration.

The idea is that when you are on your dashboard you can search cards, but when no cards are found you can press enter to query the search text into a search engine of your choice.

You should also be able to search manually, so even if there are some cards found you should be able to press a "search on web" button.

Both DuckDuckGo and Google have a GET parameter to send a search query (q=Some+search+query), for example: https://duckduckgo.com/?q=Some+search+query https://www.google.com/search?q=Some+search+query

It would be an easy improvement as you can easily built the url encoded query string in javascript Add a counter to the

$(".toggle-tag-expand-btn").each(function(e) {
    // ...
});

loop, when the counter hits 0 and the user pressed enter, it queries the result

As for the configurations, I am not too familiar with Python but it could be under the general Settings

[Settings]
theme = light
accent = orange
[...]
sidebar_default = open
default_search_engine = https://duckduckgo.com