Bug 1838838 - Ship v117.0.0 of the WebCompat System Addon; r=ksenia,webcompat-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D184838
This commit is contained in:
Thomas Wisniewski 2023-07-28 19:57:47 +00:00
Родитель 4ff93d1005
Коммит 0c562b4122
7 изменённых файлов: 70 добавлений и 103 удалений

Просмотреть файл

@ -255,7 +255,10 @@ const AVAILABLE_INJECTIONS = [
domain: "datastudio.google.com",
bug: "1631811",
contentScripts: {
matches: ["https://datastudio.google.com/embed/reporting/*"],
matches: [
"https://datastudio.google.com/embed/reporting/*",
"https://lookerstudio.google.com/embed/reporting/*",
],
js: [
{
file: "injections/js/bug1631811-datastudio.google.com-indexedDB.js",
@ -352,22 +355,6 @@ const AVAILABLE_INJECTIONS = [
allFrames: true,
},
},
{
id: "bug1724764",
platform: "android",
domain: "Issues related to missing window.print",
bug: "1724764",
contentScripts: {
matches: [
"*://*.edupage.org/*", // 1804477 and 1800118
],
js: [
{
file: "injections/js/bug1724764-window-print.js",
},
],
},
},
{
id: "bug1724868",
platform: "android",
@ -1026,6 +1013,20 @@ const AVAILABLE_INJECTIONS = [
],
},
},
{
id: "bug1841991",
platform: "all",
domain: "wilton.com",
bug: "1841991",
contentScripts: {
matches: ["*://*.wilton.com/*"],
css: [
{
file: "injections/css/bug1841991-wilton.com-flexbox-painting-order.css",
},
],
},
},
];
module.exports = AVAILABLE_INJECTIONS;

Просмотреть файл

@ -346,26 +346,6 @@ const AVAILABLE_UA_OVERRIDES = [
},
},
},
{
/*
* Bug 1628455 - UA override for autotrader.ca
* Webcompat issue #50961 - https://webcompat.com/issues/50961
*
* autotrader.ca is showing desktop site for Firefox on Android
* based on server side UA detection. Spoofing as Chrome allows to
* get mobile experience
*/
id: "bug1628455",
platform: "android",
domain: "autotrader.ca",
bug: "1628455",
config: {
matches: ["https://*.autotrader.ca/*"],
uaTransformer: () => {
return UAHelpers.getDeviceAppropriateChromeUA();
},
},
},
{
/*
* Bug 1646791 - bancosantander.es - Re-add UA override.
@ -798,25 +778,6 @@ const AVAILABLE_UA_OVERRIDES = [
},
},
},
{
/*
* Bug 1803131 - UA override for argaam.com
* Webcompat issue #113638 - https://webcompat.com/issues/113638
*
* To receive the proper mobile version instead of the desktop version
* the UA is spoofed.
*/
id: "bug1803131",
platform: "android",
domain: "argaam.com",
bug: "1803131",
config: {
matches: ["*://*.argaam.com/*"],
uaTransformer: originalUA => {
return UAHelpers.getDeviceAppropriateChromeUA();
},
},
},
{
/*
* Bug 1819702 - UA override for feelgoodcontacts.com
@ -868,22 +829,6 @@ const AVAILABLE_UA_OVERRIDES = [
},
},
},
{
/*
* Bug 1827678 - UA override for www.hepsiburada.com
* Webcompat issue #66888 - https://webcompat.com/issues/66888
*/
id: "bug1827678-webc66888",
platform: "android",
domain: "www.hepsiburada.com",
bug: "1827678",
config: {
matches: ["*://www.hepsiburada.com/*"],
uaTransformer: originalUA => {
return UAHelpers.getDeviceAppropriateChromeUA();
},
},
},
{
/*
* Bug 1827678 - UA override for bankmandiri.co.id
@ -1139,7 +1084,7 @@ const AVAILABLE_UA_OVERRIDES = [
"*://*.captainjackcasino.com/*", // 79490
"*://*.casinoextreme.eu/*", // 118175
"*://*.cryptoloko.com/*", // 117911
"*://*.heapsowins.com/*", // 120027
"*://*.123lobbygames.com/*", // 120027
"*://*.planet7casino.com/*", // 120609
"*://*.yebocasino.co.za/*", // 88409
"*://*.yabbycasino.com/*", // 108025
@ -1351,6 +1296,27 @@ const AVAILABLE_UA_OVERRIDES = [
},
},
},
{
/*
* Bug 1843234 - UA override for fdj.fr
*
* The site blocks Linux users from playing games,
* so use a Windows user-agent on Linux.
*/
id: "bug1843234",
platform: "desktop",
domain: "fdj.fr",
bug: "1843234",
config: {
matches: ["*://*.fdj.fr/*"],
uaTransformer: originalUA => {
if (originalUA.includes("Linux")) {
return UAHelpers.getWindowsUA(originalUA);
}
return originalUA;
},
},
},
];
module.exports = AVAILABLE_UA_OVERRIDES;

Просмотреть файл

@ -0,0 +1,23 @@
/* 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/. */
/**
* wilton.com - Images in the product carousel are not clickable
* web-bug #123994 - https://github.com/webcompat/web-bugs/issues/123994
*
* wilton.com relies on a non-interoperable CSS flexbox side-effect of
* specifying the `order` on elements. See bug 1841986. This intervention
* unsets the order, as it's not doing anything useful in the Desktop view
* anyway.
*/
@media (min-width: 801px) {
.product-page
.body
> div
> .container.product-details-page
.productView-image {
order: unset;
}
}

Просмотреть файл

@ -1,28 +0,0 @@
/* 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";
/**
* Generic window.print shim
*
* Issues related to an error caused by missing window.print() method on Android.
* Adding print to the window object allows to unbreak the sites.
*/
/* globals exportFunction */
if (typeof window.print === "undefined") {
console.info(
"window.print has been shimmed for compatibility reasons. See https://bugzilla.mozilla.org/show_bug.cgi?id=1659818 for details."
);
Object.defineProperty(window.wrappedJSObject, "print", {
get: exportFunction(function () {
return true;
}, window),
set: exportFunction(function () {}, window),
});
}

Просмотреть файл

@ -72,6 +72,11 @@ var UAHelpers = {
.replace(`Firefox/${ver[1]}`, "Firefox/99.0")
.replace(`rv:${ver[1]}`, "rv:99.0");
},
getWindowsUA(originalUA) {
const rv = originalUA.match("rv:[0-9]+.[0-9]+")[0];
const ver = originalUA.match("Firefox/[0-9]+.[0-9]+")[0];
return `Mozilla/5.0 (Windows NT 10.0; Win64; x64; ${rv}) Gecko/20100101 ${ver}`;
},
};
if (typeof module !== "undefined") {

Просмотреть файл

@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "Web Compatibility Interventions",
"description": "Urgent post-release fixes for web compatibility.",
"version": "116.1.0",
"version": "117.0.0",
"browser_specific_settings": {
"gecko": {
"id": "webcompat@mozilla.org",

Просмотреть файл

@ -74,6 +74,7 @@ FINAL_TARGET_FILES.features["webcompat@mozilla.org"]["injections"]["css"] += [
"injections/css/bug1830813-page.onstove.com-hide-unsupported.css",
"injections/css/bug1836103-autostar-novoross.ru-make-map-taller.css",
"injections/css/bug1836105-cnn.com-fix-blank-pages-when-printing.css",
"injections/css/bug1841991-wilton.com-flexbox-painting-order.css",
]
FINAL_TARGET_FILES.features["webcompat@mozilla.org"]["injections"]["js"] += [
@ -86,7 +87,6 @@ FINAL_TARGET_FILES.features["webcompat@mozilla.org"]["injections"]["js"] += [
"injections/js/bug1605611-maps.google.com-directions-time.js",
"injections/js/bug1631811-datastudio.google.com-indexedDB.js",
"injections/js/bug1722955-frontgate.com-ua-override.js",
"injections/js/bug1724764-window-print.js",
"injections/js/bug1724868-news.yahoo.co.jp-ua-override.js",
"injections/js/bug1731825-office365-email-handling-prompt-autohide.js",
"injections/js/bug1739489-draftjs-beforeinput.js",