andy-portmen / country-flags

adds a toolbar button to browser address-bar displaying current physical location of visited website
https://webextension.org/listing/country-flags.html
Mozilla Public License 2.0
133 stars 35 forks source link

placeholder texts should be explained #33

Open Djfe opened 6 years ago

Djfe commented 6 years ago

The following ones should be explained/listed on the addon settings page, I think. [host] [ip] [enurl] [curl] are there any more that I missed

andy-portmen commented 6 years ago

Since we don't have any good place in the options page, I added them in the FAQs page https://add0n.com/country-flags.html#faq10

I think only few users are going to use these custom URLs and those will find the descriptions in the FAQs page.

Djfe commented 6 years ago

ok, works for me :) It would be nice to have one for [host] but without the top-level-domain. Searching in Wikipedia for Github.com works, but not in the german one because of a missing redirect in the german wikipedia from github.com to github. This likely applies to other articles as well.

andy-portmen commented 6 years ago

It would be nice to have one for [host] but without the top-level-domain.

It is really hard to drop the extension considering there is no API for it. What about more complex extensions like ".co.nr"?

Djfe commented 6 years ago

I didn't even know that existed. is that really a TLD and not TLD + 2nd level domain?

andy-portmen commented 6 years ago

Definitely a TLD + 2nd level domain.

There are many more cases which makes it hard to write a reliable parser module https://en.wikipedia.org/wiki/Second-level_domain

Djfe commented 6 years ago

something that only strips of the tld (.co in this case) would be already enough ;)

andy-portmen commented 6 years ago

I am still unclear how we can strip all the domain extensions considering that there are many new ones: https://iwantmyname.com/domains/domain-name-registration-list-of-extensions

We can have a function that works partially though. Like the one that is suggested in https://stackoverflow.com/questions/17149098/javascript-regular-expression-to-remove-domain-extention

If you can come up with a function that works for most of these domains, please share so that we can prepare it for the next release as [baredomain] for instance.