twofactorauth
twofactorauth copied to clipboard
Pre-populated search field
- [x] I have searched open issues and pull requests. The issue I'm creating is not a duplicate of an existing open issue or pull request.
Information about the feature to be added:
Sometimes I show some friends this site when they ask me about 2fa for a specific website. A much easier way would be a pre-populated search field, so they find the information faster. It could also be handy for links from another website.
This could be done client side:
// https://2fa.directory/int/?q=github
let search_field = new URLSearchParams(window.location.search).get('q');
We currently have an auto-redirect that might conflict with this feature. For example, if I clicked on https://2fa.directory/?q=harvard (from Germany), it would result in the target URL https://2fa.directory/de/ with the search term "harvard" - and will get no results. Maybe we might be able to disable the auto-redirection when a search term is present. The workaround would be to use the "int" (or any other suitable) region for these links, i.e. https://2fa.directory/int/?q=harvard or https://2fa.directory/us/?q=harvard
The country filtering is a good part of the UX, so why change the known behavior. And there is already the region notice. So a basic implementation for the search should be suitable. But I'm open-minded to other opinions.