Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firefox style search with * and ^ in the address box? #68

Open
clarkwang opened this issue Jan 25, 2022 · 5 comments
Open

Firefox style search with * and ^ in the address box? #68

clarkwang opened this issue Jan 25, 2022 · 5 comments
Milestone

Comments

@clarkwang
Copy link

To take most advantage of Fauxbar I enabled both "Show results from history" and "Show results from bookmarks" but quite often I'd like it to search bookmarks only since there are usually too many entries in the browsing history. So can we make it behave like Firefox's address bar?

  • If the query starts with *<space> then search bookmarks only
  • If the query starts with ^<space> then search history only
@clarkwang
Copy link
Author

Found the secret is:fav in code.

@ChrisNZL
Copy link
Owner

Yeah, adding is:fav to the query is the only way to restrict the search to bookmarks at the moment.

Would be keen to make * and behave like Firefox as options, sure.

Definitely room for improvement within Fauxbar's Options to explain such things better.

@clarkwang
Copy link
Author

Hi ChrisNZL,

The following change works fine for me. Could you help integrate it into the repo and build a new release?

diff --git a/Fauxbar/js/fauxbar-1.js b/Fauxbar/js/fauxbar-1.js
index 73115a1..7c4fc84 100755
--- a/Fauxbar/js/fauxbar-1.js
+++ b/Fauxbar/js/fauxbar-1.js
@@ -2555,7 +2555,7 @@ function getResults(noQuery) {

                    for (var w in words) {
                        if (words[w] != "") {
-                           if (words[w].toLowerCase() == 'is:fav') {
+                           if (words[w] == '*' || words[w].toLowerCase() == 'is:fav') {
                                modifiers += ' AND type = 2 ';
                            }
                            else {

@ChrisNZL ChrisNZL added this to the 1.9.0 milestone Mar 4, 2022
@ChrisNZL
Copy link
Owner

ChrisNZL commented Mar 4, 2022

Marking this issue for the upcoming 1.9 version.

If you create a pull request, I can link it properly...

But if not, your change above looks fine; I'll integrate it in due course.

(Lately, have been slowly tackling the Manifest V3 refactor, so not really keen to push a new version live until that's done. But can apply your change as I go through the list)

@clarkwang
Copy link
Author

I'd not bother making a pull request. Just integrate it. We really need this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants