зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1784302 - Add a navigator.connection intervention for open.toutiao.com; r=webcompat-reviewers,ksenia
Differential Revision: https://phabricator.services.mozilla.com/D154425
This commit is contained in:
Родитель
ba2a960d5f
Коммит
bc244b3b70
|
@ -612,6 +612,20 @@ const AVAILABLE_INJECTIONS = [
|
|||
allFrames: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "bug1784302",
|
||||
platform: "android",
|
||||
domain: "open.toutiao.com",
|
||||
bug: "1784302",
|
||||
contentScripts: {
|
||||
matches: ["*://open.toutiao.com/*"],
|
||||
js: [
|
||||
{
|
||||
file: "injections/js/bug1784302-effectiveType-shim.js",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "bug1784309",
|
||||
platform: "all",
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
"use strict";
|
||||
|
||||
/**
|
||||
* Bug 1784302 - Issues due to missing navigator.connection after
|
||||
* https://bugzilla.mozilla.org/show_bug.cgi?id=1637922 landed.
|
||||
* Webcompat issue #104838 - https://github.com/webcompat/web-bugs/issues/104838
|
||||
*/
|
||||
|
||||
/* globals cloneInto, exportFunction */
|
||||
|
||||
console.info(
|
||||
"navigator.connection has been shimmed for compatibility reasons. See https://bugzilla.mozilla.org/show_bug.cgi?id=1756692 for details."
|
||||
);
|
||||
|
||||
var connection = {
|
||||
addEventListener: () => {},
|
||||
removeEventListener: () => {},
|
||||
effectiveType: "4g",
|
||||
};
|
||||
|
||||
window.navigator.wrappedJSObject.connection = cloneInto(connection, window, {
|
||||
cloneFunctions: true,
|
||||
});
|
|
@ -2,7 +2,7 @@
|
|||
"manifest_version": 2,
|
||||
"name": "Web Compatibility Interventions",
|
||||
"description": "Urgent post-release fixes for web compatibility.",
|
||||
"version": "104.6.0",
|
||||
"version": "104.7.0",
|
||||
"applications": {
|
||||
"gecko": {
|
||||
"id": "webcompat@mozilla.org",
|
||||
|
|
|
@ -84,6 +84,7 @@ FINAL_TARGET_FILES.features["webcompat@mozilla.org"]["injections"]["js"] += [
|
|||
"injections/js/bug1772949-youtube-webshare-shim.js",
|
||||
"injections/js/bug1774005-installtrigger-shim.js",
|
||||
"injections/js/bug1778239-m.pji.co.kr-banner-hide.js",
|
||||
"injections/js/bug1784302-effectiveType-shim.js",
|
||||
"injections/js/bug1784309-bet365.com-math-pow.js",
|
||||
]
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче