twofactorauth icon indicating copy to clipboard operation
twofactorauth copied to clipboard

Pre-populated search field

Open sn00py1310 opened this issue 3 years ago • 2 comments
trafficstars

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');

sn00py1310 avatar Apr 22 '22 11:04 sn00py1310

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

phallobst avatar May 14 '22 17:05 phallobst

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.

sn00py1310 avatar May 14 '22 22:05 sn00py1310