app icon indicating copy to clipboard operation
app copied to clipboard

Prefix suggestion is made more useful for .co.jp and .co.uk

Open alung opened this issue 4 years ago • 3 comments

When a prefix suggestion is requested for a website whose domain name looks ends in "co.jp" or "co.uk" (which is very common in Japan or the UK, the Simple login extension invariably suggests "co" as a new alias prefix.

This diff proposes to go one subdomain up when available in this case. For example, for "jprs.co.jp", it will suggest "jprs" instead of "co" currently.

I've submitted some feedback on Twitter in https://twitter.com/alung/status/1402559093592805377, ended up writing a PR ^^

alung avatar Jun 28 '21 09:06 alung

@alung thanks for making the PR! I wonder if we can use this library to extract the domain name which should take into account all special cases like .co.jp, co.uk, etc? https://github.com/john-kurkowski/tldextract

nguyenkims avatar Jun 28 '21 14:06 nguyenkims

I can make the change to use this module, I like the proposal to be more generic and the private subdomains idea (though at the expense of the package size / security maybe? you make the call :) ). I'm new to python / github projects though, is there a file where you define the third party dependencies to include to the project?

alung avatar Jun 28 '21 15:06 alung

@alung poetry (https://python-poetry.org) is used to manage dependencies in the repo and to add a new library, you can run poetry add something.

nguyenkims avatar Jun 30 '21 16:06 nguyenkims