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

[feature] improve the ease with which the search field can be added as a search engine in the browser (firefox) #30

Closed
Jiehong opened this issue Jan 12, 2022 · 3 comments
Labels
Type: Enhancement New feature or request

Comments

@Jiehong
Copy link

Jiehong commented Jan 12, 2022

Hi,

Today, the documentation says that the bookmarks can be used as a search engine by using https://darekkay.com/static-marks/demo/default.html?search=%s.

Which is great (really!)

However, when right-clicking on the search field, the browser does not seem to allow you to do that automatically, even though it should (here, with Firefox 96).

There is a way to fix that easily, though: by converting the <div class="filter" role="search"> to a form, and giving a name to the input field:

<form class="filter" role="search">
  <div class="filter-button empty">
    <button type="button" class="btn-unstyled" aria-label="Clear filter" disabled="">
      <div class="icon icon-search"></div>
    </button>
  </div>
  <input aria-label="Search everywhere" type="search" class="input" placeholder="Search everywhere..." name="search">
</form>

(No visual change for the user).

With this, (in Firefox), you can right-click the search field, and select "Add a keyword for this search", and it will smartly understand that you want to use https://darekkay.com/static-marks/demo/default.html?search=%s as the search term.

This feature has been removed in Chrome for a few years already, so this won't help there.

@darekkay darekkay added the Type: Enhancement New feature or request label Jan 13, 2022
@RishiKumarRay
Copy link

where i can find the code?

@darekkay
Copy link
Owner

Thanks @Jiehong , that's a small but great improvement 🚀 I've applied your suggestion and it works like a charm. The feature will be available in the next release.

@darekkay
Copy link
Owner

Released in 2.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants