forked from mirrors/gecko-dev
This detects when the user is on a VPN and treats it the same as when the user
is offline: If a fetch is triggered, `QuickSuggest.weather.suggestion` is set to
null, and when the VPN is disconnected, a new fetch is triggered.
That means if a successful fetch happens before the user connects to the VPN,
Firefox will continue to show that accurate suggestion for the full fetch period
(30 min), even after the user connects to the VPN. The first time a fetch is
attempted while the VPN is active, the suggestion will be set to null, and
Firefox will stop showing it. Once the user turns off the VPN, a new fetch will
be triggered and the new accurate suggestion will be shown.
Unfortunately Firefox's VPN detection only works on Windows.
If you need to test weather suggestions using a VPN, you can run the following
JS in the browser console first. It will disable VPN detection.
```
QuickSuggest._test_linkService = {};
```
Differential Revision: https://phabricator.services.mozilla.com/D173232
|
||
|---|---|---|
| .. | ||
| BaseFeature.sys.mjs | ||
| BlockedSuggestions.sys.mjs | ||
| ImpressionCaps.sys.mjs | ||
| RemoteSettingsClient.sys.mjs | ||
| Weather.sys.mjs | ||