Skip to content

Commit

Permalink
Bug 1663980 - Ship v18.1.0 of feature-webcompat
Browse files Browse the repository at this point in the history
  • Loading branch information
ksy36 authored and mergify[bot] committed Dec 7, 2020
1 parent 35c99f4 commit eccea58
Show file tree
Hide file tree
Showing 7 changed files with 156 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -271,20 +271,6 @@ const AVAILABLE_INJECTIONS = [
},
customFunc: "detectSwipeFix",
},
{
id: "bug1632019",
platform: "all",
domain: "everyman.co",
bug: "1632019",
contentScripts: {
matches: ["https://everyman.co/*"],
css: [
{
file: "injections/css/bug1632019-everyman.co-gallery-width-fix.css",
},
],
},
},
{
id: "bug1644830",
platform: "desktop",
Expand Down Expand Up @@ -414,6 +400,54 @@ const AVAILABLE_INJECTIONS = [
],
},
},
{
id: "bug1631811",
platform: "all",
domain: "datastudio.google.com",
bug: "1631811",
contentScripts: {
matches: ["https://datastudio.google.com/embed/reporting/*"],
js: [
{
file: "injections/js/bug1631811-datastudio.google.com-indexedDB.js",
},
],
allFrames: true,
},
},
{
id: "bug1665035",
platform: "desktop",
domain: "dckids.com",
bug: "1665035",
contentScripts: {
matches: [
"https://d3qlaywcwingl6.cloudfront.net/content/*/Html5Game/*",
"https://d3qlaywcwingl6.cloudfront.net/*/game/content/*",
],
js: [
{
file: "injections/js/bug1665035-dckids.com-cookieEnabled.js",
},
],
allFrames: true,
},
},
{
id: "bug1677442",
platform: "desktop",
domain: "store.hp.com",
bug: "1677442",
contentScripts: {
matches: ["*://d3nkfb7815bs43.cloudfront.net/*forstore.hp.com*"],
js: [
{
file: "injections/js/bug1677442-store.hp.com-disable-indexeddb.js",
},
],
allFrames: true,
},
},
];

module.exports = AVAILABLE_INJECTIONS;
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const AVAILABLE_UA_OVERRIDES = [
* Spoofing as Chrome prevents the site from doing a constant page refresh
*/
id: "bug1610010",
platform: "desktop",
platform: "all",
domain: "criticalcareontario.ca",
bug: "1610010",
config: {
Expand Down Expand Up @@ -695,6 +695,44 @@ const AVAILABLE_UA_OVERRIDES = [
},
},
},
{
/*
* Bug 1679847 - Add UA override for avto.pro
* Webcompat issue #60043 - https://webcompat.com/issues/60043
*
* Unless Chrome is in the UA, the site serves a desktop version
* on catalog pages
*/
id: "bug1679847",
platform: "android",
domain: "avto.pro",
bug: "1679847",
config: {
matches: ["https://avto.pro/catalog/*"],
uaTransformer: () => {
return UAHelpers.getDeviceAppropriateChromeUA();
},
},
},
{
/*
* Bug 1679869 - Add UA override for vh1.com
* Webcompat issue #52755 - https://webcompat.com/issues/52755
*
* The site is not showing videos on Firefox on mobile stating
* that android 4.4.4 and chrome browser required
*/
id: "bug1679869",
platform: "android",
domain: "vh1.com",
bug: "1679869",
config: {
matches: ["*://*.vh1.com/*"],
uaTransformer: () => {
return UAHelpers.getDeviceAppropriateChromeUA();
},
},
},
];

const UAHelpers = {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"use strict";

/**
* Bug 1631811 - disable indexedDB for datastudio.google.com iframes
*
* Indexed DB is disabled already for these iframes due to cookie blocking.
* This intervention changes the functionality from throwing a SecurityError
* when indexedDB is accessed to removing it from the window object
*/

console.info(
"window.indexedDB has been overwritten for compatibility reasons. See https://bugzilla.mozilla.org/show_bug.cgi?id=1631811 for details."
);

Object.defineProperty(window.wrappedJSObject, "indexedDB", {
get: undefined,
set: undefined,
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
"use strict";

/**
* Bug 1665035 - enable navigator.cookieEnabled and spoof window.navigator on Linux
*
* Some of the games are not starting because navigator.cookieEnabled
* returns false for trackers with ETP strict. Overwriting the value allows
* to play the games. In addition, Linux desktop devices are incorrectly
* flagged as mobile devices (even if ETP is disabled), so spoofing
* window.navigator.platform here.
*/

console.info(
"window.cookieEnabled has been overwritten for compatibility reasons. See https://bugzilla.mozilla.org/show_bug.cgi?id=1665035 for details."
);

Object.defineProperty(window.navigator.wrappedJSObject, "cookieEnabled", {
value: true,
writable: false,
});

if (navigator.platform.includes("Linux")) {
console.info(
"navigator.platform has been overwritten for compatibility reasons. See https://bugzilla.mozilla.org/show_bug.cgi?id=1665035 for details."
);
Object.defineProperty(window.navigator.wrappedJSObject, "platform", {
value: "Win64",
writable: false,
});
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"use strict";

/**
* Bug 1677442 - disable indexedDB for d3nkfb7815bs43.cloudfront.net
*
* The site embeds an iframe with a 3D viewer. The request fails
* because BabylonJS (the 3d library) tries to access indexedDB
* from the third party context (d3nkfb7815bs43.cloudfront.net)
* Disabling indexedDB fixes it, causing it to fetch the 3d resource
* via network.
*/

console.info(
"window.indexedDB has been overwritten for compatibility reasons. See https://bugzilla.mozilla.org/show_bug.cgi?id=1677442 for details."
);

Object.defineProperty(window.wrappedJSObject, "indexedDB", {
get: undefined,
set: undefined,
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "Mozilla Android Components - Web Compatibility Interventions",
"description": "Urgent post-release fixes for web compatibility.",
"version": "17.0.0",
"version": "18.1.0",

"applications": {
"gecko": {
Expand Down

0 comments on commit eccea58

Please sign in to comment.