Skip to content
This repository was archived by the owner on Jun 2, 2025. It is now read-only.

Commit 0a8553f

Browse files
committed
Bug 1950282 - fix our Formula1 intervention on Linux; r?denschub
1 parent b9add35 commit 0a8553f

File tree

6 files changed

+39
-5
lines changed

6 files changed

+39
-5
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "Urgent post-release fixes for web compatibility.",
55
"license": "MPL-2.0",
66
"repository": "https://github.com/mozilla/webcompat-addon",
7-
"version": "137.5.0",
7+
"version": "137.6.0",
88
"docker-image": "node-lts-latest",
99
"private": true,
1010
"scripts": {

src/data/interventions.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3113,7 +3113,13 @@
31133113
"interventions": [
31143114
{
31153115
"platforms": ["all"],
3116-
"ua_string": ["add_Chrome"]
3116+
"ua_string": ["Chrome", "add_Firefox_as_Gecko"]
3117+
},
3118+
{
3119+
"platforms": ["linux"],
3120+
"content_scripts": {
3121+
"js": ["bug1950282-formula1.com-platform-linux-fix.js"]
3122+
}
31173123
}
31183124
]
31193125
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
5+
"use strict";
6+
7+
/**
8+
* Bug 1472075 - Build UA override for Bank of America for OSX & Linux
9+
*
10+
* Formula1 TV is doing some kind of check for Android devices which is
11+
* causing it to treat Firefox on Linux as an Android device, and blocking it.
12+
* Overriding navigator.platform to Win64 on Linux works around this issue.
13+
*/
14+
15+
/* globals exportFunction */
16+
17+
console.info(
18+
"navigator.platform has been overridden for compatibility reasons. See https://bugzilla.mozilla.org/show_bug.cgi?id=1950282 for details."
19+
);
20+
21+
Object.defineProperty(window.navigator.wrappedJSObject, "platform", {
22+
get: exportFunction(function () {
23+
return "Win64";
24+
}, window),
25+
26+
set: exportFunction(function () {}, window),
27+
});

src/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifest_version": 2,
33
"name": "Web Compatibility Interventions",
44
"description": "Urgent post-release fixes for web compatibility.",
5-
"version": "137.5.0",
5+
"version": "137.6.0",
66
"browser_specific_settings": {
77
"gecko": {
88
"id": "webcompat@mozilla.org",

src/moz.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ FINAL_TARGET_FILES.features["webcompat@mozilla.org"]["injections"]["js"] += [
132132
"injections/js/bug1930440-online.singaporepools.com-prevent-unsupported-alert.js",
133133
"injections/js/bug1943898-www.capital.gr-suppress-constant-reloading.js",
134134
"injections/js/bug1945019-order.mealkeyway.com-prevent-unsupported-message.js",
135+
"injections/js/bug1950282-formula1.com-platform-linux-fix.js",
135136
]
136137

137138
FINAL_TARGET_FILES.features["webcompat@mozilla.org"]["shims"] += [

0 commit comments

Comments
 (0)