forked from mirrors/gecko-dev
Bug 1950282 - add a UA override for f1tv.formula1.com on ESR128; a=pascalc
Differential Revision: https://phabricator.services.mozilla.com/D240268
This commit is contained in:
parent
eaf93401b7
commit
efbf019aeb
5 changed files with 61 additions and 1 deletions
|
|
@ -1316,6 +1316,20 @@ const AVAILABLE_INJECTIONS = [
|
|||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "bug1950282",
|
||||
platform: "linux",
|
||||
domain: "formula1.com",
|
||||
bug: "1950282",
|
||||
contentScripts: {
|
||||
matches: ["*://*.formula1.com/*"],
|
||||
js: [
|
||||
{
|
||||
file: "injections/js/bug1950282-formula1.com-platform-linux-fix.js",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
module.exports = AVAILABLE_INJECTIONS;
|
||||
|
|
|
|||
|
|
@ -1458,6 +1458,24 @@ const AVAILABLE_UA_OVERRIDES = [
|
|||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
/*
|
||||
* Bug 1950282 - UA override for formula1.com
|
||||
* Webcompat issue #149085 - https://webcompat.com/issues/149085
|
||||
*
|
||||
* Site blocks Firefox, but works with a UA spoof.
|
||||
*/
|
||||
id: "1950282",
|
||||
platform: "all",
|
||||
domain: "formula1.com",
|
||||
bug: "1950282",
|
||||
config: {
|
||||
matches: ["*://*.formula1.com/*"],
|
||||
uaTransformer: () => {
|
||||
return UAHelpers.getDeviceAppropriateChromeUA();
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
module.exports = AVAILABLE_UA_OVERRIDES;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* Bug 1472075 - Build UA override for Bank of America for OSX & Linux
|
||||
*
|
||||
* Formula1 TV is doing some kind of check for Android devices which is
|
||||
* causing it to treat Firefox on Linux as an Android device, and blocking it.
|
||||
* Overriding navigator.platform to Win64 on Linux works around this issue.
|
||||
*/
|
||||
|
||||
/* globals exportFunction */
|
||||
|
||||
console.info(
|
||||
"navigator.platform has been overridden for compatibility reasons. See https://bugzilla.mozilla.org/show_bug.cgi?id=1950282 for details."
|
||||
);
|
||||
|
||||
Object.defineProperty(window.navigator.wrappedJSObject, "platform", {
|
||||
get: exportFunction(function () {
|
||||
return "Win64";
|
||||
}, window),
|
||||
|
||||
set: exportFunction(function () {}, window),
|
||||
});
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
"manifest_version": 2,
|
||||
"name": "Web Compatibility Interventions",
|
||||
"description": "Urgent post-release fixes for web compatibility.",
|
||||
"version": "133.3.0",
|
||||
"version": "133.4.0",
|
||||
"browser_specific_settings": {
|
||||
"gecko": {
|
||||
"id": "webcompat@mozilla.org",
|
||||
|
|
|
|||
|
|
@ -120,6 +120,7 @@ FINAL_TARGET_FILES.features["webcompat@mozilla.org"]["injections"]["js"] += [
|
|||
"injections/js/bug1898952-digits.t-mobile.com.js",
|
||||
"injections/js/bug1899937-plus.nhk.jp-request-picture-in-picture.js",
|
||||
"injections/js/bug1924500-www.tiktok.com-fix-captcha-slider.js",
|
||||
"injections/js/bug1950282-formula1.com-platform-linux-fix.js",
|
||||
]
|
||||
|
||||
FINAL_TARGET_FILES.features["webcompat@mozilla.org"]["shims"] += [
|
||||
|
|
|
|||
Loading…
Reference in a new issue