mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 08:18:41 +09:00
Add site-specific overrides and remove the overruling global.
This commit is contained in:
parent
325f4d648e
commit
020e884bb8
2 changed files with 4 additions and 10 deletions
|
|
@ -64,6 +64,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "AlertsService", "@mozilla.org/alerts-s
|
|||
["Task", "resource://gre/modules/Task.jsm"],
|
||||
["UITour", "resource:///modules/UITour.jsm"],
|
||||
["URLBarZoom", "resource:///modules/URLBarZoom.jsm"],
|
||||
["UserAgentOverrides", "resource://gre/modules/UserAgentOverrides.jsm"],
|
||||
["WebChannel", "resource://gre/modules/WebChannel.jsm"],
|
||||
["WindowsRegistry", "resource://gre/modules/WindowsRegistry.jsm"],
|
||||
["webrtcUI", "resource:///modules/webrtcUI.jsm"],
|
||||
|
|
@ -662,6 +663,8 @@ BrowserGlue.prototype = {
|
|||
}
|
||||
} catch (ex) { /* missing any of the prefs is not critical */ }
|
||||
|
||||
UserAgentOverrides.init();
|
||||
|
||||
PageThumbs.init();
|
||||
webrtcUI.init();
|
||||
AboutHome.init();
|
||||
|
|
@ -1042,6 +1045,7 @@ BrowserGlue.prototype = {
|
|||
|
||||
BrowserUsageTelemetry.uninit();
|
||||
SelfSupportBackend.uninit();
|
||||
UserAgentOverrides.uninit();
|
||||
PageThumbs.uninit();
|
||||
NewTabMessages.uninit();
|
||||
AboutNewTab.uninit();
|
||||
|
|
|
|||
|
|
@ -1854,16 +1854,6 @@ Navigator::GetUserAgent(nsPIDOMWindowInner* aWindow, nsIURI* aURI,
|
|||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
if (!aIsCallerChrome) {
|
||||
const nsAdoptingString& override =
|
||||
mozilla::Preferences::GetString("general.useragent.override");
|
||||
|
||||
if (override) {
|
||||
aUserAgent = override;
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIHttpProtocolHandler>
|
||||
service(do_GetService(NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "http", &rv));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue