-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Treating domains with long TLDs as search queries #3268
Comments
(In short) it's too hard to do so prefectly. Chrome uses a long list of public top-level domains to decide whether a string is a hostname or just search query, and the list is in https://cs.chromium.org/chromium/src/net/base/registry_controlled_domains/effective_tld_names.dat?dr=C&g=0, which is a copy of https://www.google.com/url?q=https://publicsuffix.org/list/public_suffix_list.dat . I think this list is so long that we should not pack it into Vimium. Instead, I suggest that Vimium searches the domain list cache for your "domain name" query, and if finding any match, treates it as a valid domain. Here's what I've done in my customized Vimium ( checkInDomain_ (host: string, port?: string | null): 0 | 1 | 2 {
const domain = port && this.domains_[host + port] || this.domains_[host];
return domain ? domain.https ? 2 : 1 : 0;
}, |
I think two reasonable options are:
|
Option 2 seems, to me, like the better of the two. I expect it to result in less unexpected behavior and in case it does fail, the query will simply be searched for and the user can select the first result. On the other hand, if option 1 fails, the user is stuck in the "Hmm. We’re having trouble finding that site." and can't leave, using Vimium, which I personally find quite bothering. Also, how would you benefit from the long list? It seems it contains a ton of second-level domains (not sure if that is what they're called). |
Hey @philc, sorry for bothering. |
Entering a domain name with a long tld (such as .social or .space) opens the search engine searching for that domain instead of opening it.
The text was updated successfully, but these errors were encountered: