mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 15:55:36 +00:00
Bug 1586188 - Import WebCompat GoFaster 6.2.0 sources; r=miketaylr
Differential Revision: https://phabricator.services.mozilla.com/D48152 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
93067a6541
commit
f7866258a3
@ -203,16 +203,20 @@ const AVAILABLE_INJECTIONS = [
|
||||
{
|
||||
id: "bug1577870",
|
||||
platform: "desktop",
|
||||
domain: "slideshare.net",
|
||||
domain: "Download prompt for files with no content-type",
|
||||
bug: "1577870",
|
||||
data: {
|
||||
urls: ["https://*.linkedin.com/tscp-serving/dtag*"],
|
||||
urls: [
|
||||
"https://*.linkedin.com/tscp-serving/dtag*",
|
||||
"https://ads-us.rd.linksynergy.com/as.php*",
|
||||
"https://www.office.com/logout?sid*",
|
||||
],
|
||||
contentType: {
|
||||
name: "content-type",
|
||||
value: "text/html; charset=utf-8",
|
||||
},
|
||||
},
|
||||
customFunc: "dtagFix",
|
||||
customFunc: "noSniffFix",
|
||||
},
|
||||
{
|
||||
id: "bug1305028",
|
||||
|
@ -145,6 +145,28 @@ const AVAILABLE_UA_OVERRIDES = [
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
/*
|
||||
* Bug 1582582 - sling.com - UA override for sling.com
|
||||
* WebCompat issue #17804 - https://webcompat.com/issues/17804
|
||||
*
|
||||
* sling.com blocks Firefox users showing unsupported browser message.
|
||||
* When spoofing as Chrome playing content works fine
|
||||
*/
|
||||
id: "bug1582582",
|
||||
platform: "desktop",
|
||||
domain: "sling.com",
|
||||
bug: "1582582",
|
||||
config: {
|
||||
matches: ["https://watch.sling.com/*", "https://www.sling.com/*"],
|
||||
uaTransformer: originalUA => {
|
||||
return (
|
||||
UAHelpers.getPrefix(originalUA) +
|
||||
" AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36"
|
||||
);
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
/*
|
||||
* Bug 1480710 - m.imgur.com - Build UA override
|
||||
|
@ -36,7 +36,7 @@ const replaceStringInRequest = (
|
||||
};
|
||||
|
||||
const CUSTOM_FUNCTIONS = {
|
||||
dtagFix: injection => {
|
||||
noSniffFix: injection => {
|
||||
const { urls, contentType } = injection.data;
|
||||
const listener = (injection.data.listener = e => {
|
||||
e.responseHeaders.push(contentType);
|
||||
@ -48,7 +48,7 @@ const CUSTOM_FUNCTIONS = {
|
||||
"responseHeaders",
|
||||
]);
|
||||
},
|
||||
dtagFixDisable: injection => {
|
||||
noSniffFixDisable: injection => {
|
||||
const { listener } = injection.data;
|
||||
browser.webRequest.onHeadersReceived.removeListener(listener);
|
||||
delete injection.data.listener;
|
||||
|
@ -2,7 +2,7 @@
|
||||
"manifest_version": 2,
|
||||
"name": "Web Compat",
|
||||
"description": "Urgent post-release fixes for web compatibility.",
|
||||
"version": "6.1.0",
|
||||
"version": "6.2.0",
|
||||
|
||||
"applications": {
|
||||
"gecko": {
|
||||
|
@ -203,16 +203,20 @@ const AVAILABLE_INJECTIONS = [
|
||||
{
|
||||
id: "bug1577870",
|
||||
platform: "desktop",
|
||||
domain: "slideshare.net",
|
||||
domain: "Download prompt for files with no content-type",
|
||||
bug: "1577870",
|
||||
data: {
|
||||
urls: ["https://*.linkedin.com/tscp-serving/dtag*"],
|
||||
urls: [
|
||||
"https://*.linkedin.com/tscp-serving/dtag*",
|
||||
"https://ads-us.rd.linksynergy.com/as.php*",
|
||||
"https://www.office.com/logout?sid*",
|
||||
],
|
||||
contentType: {
|
||||
name: "content-type",
|
||||
value: "text/html; charset=utf-8",
|
||||
},
|
||||
},
|
||||
customFunc: "dtagFix",
|
||||
customFunc: "noSniffFix",
|
||||
},
|
||||
{
|
||||
id: "bug1305028",
|
||||
|
@ -145,6 +145,28 @@ const AVAILABLE_UA_OVERRIDES = [
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
/*
|
||||
* Bug 1582582 - sling.com - UA override for sling.com
|
||||
* WebCompat issue #17804 - https://webcompat.com/issues/17804
|
||||
*
|
||||
* sling.com blocks Firefox users showing unsupported browser message.
|
||||
* When spoofing as Chrome playing content works fine
|
||||
*/
|
||||
id: "bug1582582",
|
||||
platform: "desktop",
|
||||
domain: "sling.com",
|
||||
bug: "1582582",
|
||||
config: {
|
||||
matches: ["https://watch.sling.com/*", "https://www.sling.com/*"],
|
||||
uaTransformer: originalUA => {
|
||||
return (
|
||||
UAHelpers.getPrefix(originalUA) +
|
||||
" AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36"
|
||||
);
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
/*
|
||||
* Bug 1480710 - m.imgur.com - Build UA override
|
||||
|
@ -36,7 +36,7 @@ const replaceStringInRequest = (
|
||||
};
|
||||
|
||||
const CUSTOM_FUNCTIONS = {
|
||||
dtagFix: injection => {
|
||||
noSniffFix: injection => {
|
||||
const { urls, contentType } = injection.data;
|
||||
const listener = (injection.data.listener = e => {
|
||||
e.responseHeaders.push(contentType);
|
||||
@ -48,7 +48,7 @@ const CUSTOM_FUNCTIONS = {
|
||||
"responseHeaders",
|
||||
]);
|
||||
},
|
||||
dtagFixDisable: injection => {
|
||||
noSniffFixDisable: injection => {
|
||||
const { listener } = injection.data;
|
||||
browser.webRequest.onHeadersReceived.removeListener(listener);
|
||||
delete injection.data.listener;
|
||||
|
@ -2,7 +2,7 @@
|
||||
"manifest_version": 2,
|
||||
"name": "Web Compat",
|
||||
"description": "Urgent post-release fixes for web compatibility.",
|
||||
"version": "6.1.0",
|
||||
"version": "6.2.0",
|
||||
|
||||
"applications": {
|
||||
"gecko": {
|
||||
|
Loading…
Reference in New Issue
Block a user