Bug 787054 - Make the UA string OS agnostic again, use UserAgentOverrides.jsm to white-list sites that need "Android" [r=dao,gerv]

This commit is contained in:
Fabrice Desré 2012-10-03 13:27:46 -07:00
parent d14ebc63da
commit 2d02559cb5
3 changed files with 9 additions and 0 deletions

View File

@ -576,3 +576,7 @@ pref("browser.prompt.allowNative", false);
// they are handled separately. This pref is only read once at startup:
// a restart is required to enable a new value.
pref("network.activity.blipIntervalMilliseconds", 250);
// Send some sites a custom user-agent.
pref("general.useragent.override.facebook.com", "\(Mobile#(Android; Mobile");
pref("general.useragent.override.youtube.com", "\(Mobile#(Android; Mobile");

View File

@ -24,6 +24,7 @@ Cu.import('resource://gre/modules/ObjectWrapper.jsm');
Cu.import('resource://gre/modules/accessibility/AccessFu.jsm');
Cu.import('resource://gre/modules/Payment.jsm');
Cu.import("resource://gre/modules/AppsUtils.jsm");
Cu.import('resource://gre/modules/UserAgentOverrides.jsm');
XPCOMUtils.defineLazyServiceGetter(Services, 'env',
'@mozilla.org/process/environment;1',
@ -178,6 +179,7 @@ var shell = {
CustomEventManager.init();
WebappsHelper.init();
AccessFu.attach(window);
UserAgentOverrides.init();
// XXX could factor out into a settings->pref map. Not worth it yet.
SettingsListener.observe("debug.fps.enabled", false, function(value) {
@ -213,6 +215,7 @@ var shell = {
#ifndef MOZ_WIDGET_GONK
delete Services.audioManager;
#endif
UserAgentOverrides.uninit();
},
// If this key event actually represents a hardware button, filter it here

View File

@ -8,6 +8,8 @@ MOZ_APP_VENDOR=Mozilla
MOZ_APP_VERSION=18.0a1
MOZ_APP_UA_NAME=Firefox
MOZ_UA_OS_AGNOSTIC=1
MOZ_B2G_VERSION=1.0.0
MOZ_BRANDING_DIRECTORY=b2g/branding/unofficial