probably-china
v1.0.0
Published
A lucky guess that we are probably in China or facing a Chinese user.
Downloads
2
Readme
probably-china
A lucky guess that we are probably in China or facing a Chinese user.
This is a simple package for the browser environment that makes a quick guess to see if the current webpage is running in China, or if the user is from China, based on the available browser info. It currently uses two strategies:
- Check if the current browser favors simplified Chinese or related languages.
- Check if the current timezone is one of the Chinese timezones.
The use case for this package is not to avoid showing information that are sensitive in China.