rasa/scoop-directory

Start search from url (e.g. ?q="asdf")

tech189 opened this issue · 1 comments

It would be nice to be able to start a search straight from the URL bar with an argument in the URL like a search engine. For example like Chocolatey's package search: https://community.chocolatey.org/packages?q=asdf. We could have https://rasa.github.io/scoop-directory/search?q=asdf Then you could set up a search shortcut/bookmark in your browser using the %s substitute marker (not sure what it's called), so you just have to type scoop asdf to start your search! 😄

rasa commented

Yeah. I tried to get that working via

scoop-directory/search.html

Lines 159 to 163 in 5a7b893

//const urlParams = new URLSearchParams(window.location.search);
//const q = urlParams.get('q');
//if (nameInput.value.trim() == '' && q.trim().length >= 2) {
// nameInput.value = q;
//}
, but it didn't work. Perhaps @rashil2000 has a solution?