mobile-config-autoconfig: allow user to change the user-agent (MR 16)

Preferences set with `pref()` can be changed by the user, but they're
then reset on each Firefox startup.

As users may want a different UA and keep it persistent, we should set
the default value with `defaultPref()` instead. This requires moving the
preference to the autoconfig file though, as `defaultPref()` isn't
recognized in the main config file.
This commit is contained in:
Arnaud Ferraris 2021-07-15 15:32:46 +02:00
parent 11bf740734
commit 520fb81e16
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
2 changed files with 3 additions and 3 deletions

View file

@ -47,3 +47,6 @@ if (contentFile.exists() && defaultContent.exists() &&
if (!contentFile.exists()) {
defaultContent.copyTo(chromeDir, "userContent.css");
}
// Select a mobile user agent for firefox (same as tor browser on android)
defaultPref('general.useragent.override', 'Mozilla/5.0 (Android 9; Mobile; rv:78.0) Gecko/20100101 Firefox/78.0');

View file

@ -6,9 +6,6 @@ pref('general.config.filename', "mobile-config-autoconfig.js");
pref('general.config.obscure_value', 0);
pref('general.config.sandbox_enabled', false);
// Select a mobile user agent for firefox (same as tor browser on android)
pref('general.useragent.override', 'Mozilla/5.0 (Android 9; Mobile; rv:78.0) Gecko/20100101 Firefox/78.0');
// Enable android-style pinch-to-zoom
pref('dom.w3c.touch_events.enabled', true);
pref('apz.allow_zooming', true);