diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:44:51 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:44:51 +0000 |
commit | 9e3c08db40b8916968b9f30096c7be3f00ce9647 (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /browser/extensions/webcompat/data | |
parent | Initial commit. (diff) | |
download | thunderbird-9e3c08db40b8916968b9f30096c7be3f00ce9647.tar.xz thunderbird-9e3c08db40b8916968b9f30096c7be3f00ce9647.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/extensions/webcompat/data')
-rw-r--r-- | browser/extensions/webcompat/data/injections.js | 1059 | ||||
-rw-r--r-- | browser/extensions/webcompat/data/shims.js | 874 | ||||
-rw-r--r-- | browser/extensions/webcompat/data/ua_overrides.js | 1371 |
3 files changed, 3304 insertions, 0 deletions
diff --git a/browser/extensions/webcompat/data/injections.js b/browser/extensions/webcompat/data/injections.js new file mode 100644 index 0000000000..3c0dc58bce --- /dev/null +++ b/browser/extensions/webcompat/data/injections.js @@ -0,0 +1,1059 @@ +/* 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"; + +/* globals module, require */ + +// This is a hack for the tests. +if (typeof InterventionHelpers === "undefined") { + var InterventionHelpers = require("../lib/intervention_helpers"); +} + +/** + * For detailed information on our policies, and a documention on this format + * and its possibilites, please check the Mozilla-Wiki at + * + * https://wiki.mozilla.org/Compatibility/Go_Faster_Addon/Override_Policies_and_Workflows#User_Agent_overrides + */ +const AVAILABLE_INJECTIONS = [ + { + id: "testbed-injection", + platform: "all", + domain: "webcompat-addon-testbed.herokuapp.com", + bug: "0000000", + hidden: true, + contentScripts: { + matches: ["*://webcompat-addon-testbed.herokuapp.com/*"], + css: [ + { + file: "injections/css/bug0000000-testbed-css-injection.css", + }, + ], + js: [ + { + file: "injections/js/bug0000000-testbed-js-injection.js", + }, + ], + }, + }, + { + id: "bug1452707", + platform: "all", + domain: "ib.absa.co.za", + bug: "1452707", + contentScripts: { + matches: ["https://ib.absa.co.za/*"], + js: [ + { + file: "injections/js/bug1452707-window.controllers-shim-ib.absa.co.za.js", + }, + ], + }, + }, + { + id: "bug1457335", + platform: "desktop", + domain: "histography.io", + bug: "1457335", + contentScripts: { + matches: ["*://histography.io/*"], + js: [ + { + file: "injections/js/bug1457335-histography.io-ua-change.js", + }, + ], + }, + }, + { + id: "bug1472075", + platform: "desktop", + domain: "bankofamerica.com", + bug: "1472075", + contentScripts: { + matches: [ + "*://*.bankofamerica.com/*", + "*://*.ml.com/*", // #120104 + ], + js: [ + { + file: "injections/js/bug1472075-bankofamerica.com-ua-change.js", + }, + ], + }, + }, + { + id: "bug1579159", + platform: "android", + domain: "m.tailieu.vn", + bug: "1579159", + contentScripts: { + matches: ["*://m.tailieu.vn/*", "*://m.elib.vn/*"], + js: [ + { + file: "injections/js/bug1579159-m.tailieu.vn-pdfjs-worker-disable.js", + }, + ], + allFrames: true, + }, + }, + { + id: "bug1583366", + platform: "desktop", + domain: "Download prompt for files with no content-type", + bug: "1583366", + data: { + urls: ["https://ads-us.rd.linksynergy.com/as.php*"], + contentType: { + name: "content-type", + value: "text/html; charset=utf-8", + }, + }, + customFunc: "noSniffFix", + }, + { + id: "bug1570328", + platform: "android", + domain: "developer.apple.com", + bug: "1570328", + contentScripts: { + matches: ["*://developer.apple.com/*"], + css: [ + { + file: "injections/css/bug1570328-developer-apple.com-transform-scale.css", + }, + ], + }, + }, + { + id: "bug1575000", + platform: "all", + domain: "apply.lloydsbank.co.uk", + bug: "1575000", + contentScripts: { + matches: ["*://apply.lloydsbank.co.uk/*"], + css: [ + { + file: "injections/css/bug1575000-apply.lloydsbank.co.uk-radio-buttons-fix.css", + }, + ], + }, + }, + { + id: "bug1605611", + platform: "android", + domain: "maps.google.com", + bug: "1605611", + contentScripts: { + matches: InterventionHelpers.matchPatternsForGoogle( + "*://www.google.", + "/maps*" + ), + css: [ + { + file: "injections/css/bug1605611-maps.google.com-directions-time.css", + }, + ], + js: [ + { + file: "injections/js/bug1605611-maps.google.com-directions-time.js", + }, + ], + }, + }, + { + id: "bug1610344", + platform: "all", + domain: "directv.com.co", + bug: "1610344", + contentScripts: { + matches: [ + "https://*.directv.com.co/*", + "https://*.directv.com.ec/*", // bug 1827706 + ], + css: [ + { + file: "injections/css/bug1610344-directv.com.co-hide-unsupported-message.css", + }, + ], + }, + }, + { + id: "bug1644830", + platform: "desktop", + domain: "usps.com", + bug: "1644830", + contentScripts: { + matches: ["https://*.usps.com/*"], + css: [ + { + file: "injections/css/bug1644830-missingmail.usps.com-checkboxes-not-visible.css", + }, + ], + }, + }, + { + id: "bug1651917", + platform: "android", + domain: "teletrader.com", + bug: "1651917", + contentScripts: { + matches: ["*://*.teletrader.com/*"], + css: [ + { + file: "injections/css/bug1651917-teletrader.com.body-transform-origin.css", + }, + ], + }, + }, + { + id: "bug1653075", + platform: "desktop", + domain: "livescience.com", + bug: "1653075", + contentScripts: { + matches: ["*://*.livescience.com/*"], + css: [ + { + file: "injections/css/bug1653075-livescience.com-scrollbar-width.css", + }, + ], + }, + }, + { + id: "bug1654877", + platform: "android", + domain: "preev.com", + bug: "1654877", + contentScripts: { + matches: ["*://preev.com/*"], + css: [ + { + file: "injections/css/bug1654877-preev.com-moz-appearance-fix.css", + }, + ], + }, + }, + { + id: "bug1654907", + platform: "android", + domain: "reactine.ca", + bug: "1654907", + contentScripts: { + matches: ["*://*.reactine.ca/*"], + css: [ + { + file: "injections/css/bug1654907-reactine.ca-hide-unsupported.css", + }, + ], + }, + }, + { + 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: "bug1694470", + platform: "android", + domain: "m.myvidster.com", + bug: "1694470", + contentScripts: { + matches: ["https://m.myvidster.com/*"], + css: [ + { + file: "injections/css/bug1694470-myvidster.com-content-not-shown.css", + }, + ], + }, + }, + { + id: "bug1731825", + platform: "desktop", + domain: "Office 365 email handling prompt", + bug: "1731825", + contentScripts: { + matches: [ + "*://*.live.com/*", + "*://*.office.com/*", + "*://*.sharepoint.com/*", + "*://*.office365.com/*", + ], + js: [ + { + file: "injections/js/bug1731825-office365-email-handling-prompt-autohide.js", + }, + ], + allFrames: true, + }, + }, + { + id: "bug1707795", + platform: "desktop", + domain: "Office Excel spreadsheets", + bug: "1707795", + contentScripts: { + matches: [ + "*://*.live.com/*", + "*://*.office.com/*", + "*://*.sharepoint.com/*", + ], + css: [ + { + file: "injections/css/bug1707795-office365-sheets-overscroll-disable.css", + }, + ], + allFrames: true, + }, + }, + { + id: "bug1712833", + platform: "all", + domain: "buskocchi.desuca.co.jp", + bug: "1712833", + contentScripts: { + matches: ["*://buskocchi.desuca.co.jp/*"], + css: [ + { + file: "injections/css/bug1712833-buskocchi.desuca.co.jp-fix-map-height.css", + }, + ], + }, + }, + { + id: "bug1722955", + platform: "android", + domain: "frontgate.com", + bug: "1722955", + contentScripts: { + matches: ["*://*.frontgate.com/*"], + js: [ + { + file: "lib/ua_helpers.js", + }, + { + file: "injections/js/bug1722955-frontgate.com-ua-override.js", + }, + ], + 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", + domain: "news.yahoo.co.jp", + bug: "1724868", + contentScripts: { + matches: ["*://news.yahoo.co.jp/articles/*", "*://s.yimg.jp/*"], + js: [ + { + file: "injections/js/bug1724868-news.yahoo.co.jp-ua-override.js", + }, + ], + allFrames: true, + }, + }, + { + id: "bug1741234", + platform: "all", + domain: "patient.alphalabs.ca", + bug: "1741234", + contentScripts: { + matches: ["*://patient.alphalabs.ca/*"], + css: [ + { + file: "injections/css/bug1741234-patient.alphalabs.ca-height-fix.css", + }, + ], + }, + }, + { + id: "bug1739489", + platform: "desktop", + domain: "Sites using draft.js", + bug: "1739489", + contentScripts: { + matches: [ + "*://draftjs.org/*", // Bug 1739489 + "*://www.facebook.com/*", // Bug 1739489 + "*://twitter.com/*", // Bug 1776229 + "*://mobile.twitter.com/*", // Bug 1776229 + "*://*.reddit.com/*", // Bug 1829755 + ], + js: [ + { + file: "injections/js/bug1739489-draftjs-beforeinput.js", + }, + ], + }, + }, + { + id: "bug1765947", + platform: "android", + domain: "veniceincoming.com", + bug: "1765947", + contentScripts: { + matches: ["*://veniceincoming.com/*"], + css: [ + { + file: "injections/css/bug1765947-veniceincoming.com-left-fix.css", + }, + ], + }, + }, + { + id: "bug11769762", + platform: "all", + domain: "tiktok.com", + bug: "1769762", + contentScripts: { + matches: ["https://www.tiktok.com/*"], + js: [ + { + file: "injections/js/bug1769762-tiktok.com-plugins-shim.js", + }, + ], + }, + }, + { + id: "bug1770962", + platform: "all", + domain: "coldwellbankerhomes.com", + bug: "1770962", + contentScripts: { + matches: ["*://*.coldwellbankerhomes.com/*"], + css: [ + { + file: "injections/css/bug1770962-coldwellbankerhomes.com-image-height.css", + }, + ], + }, + }, + { + id: "bug1774490", + platform: "all", + domain: "rainews.it", + bug: "1774490", + contentScripts: { + matches: ["*://www.rainews.it/*"], + css: [ + { + file: "injections/css/bug1774490-rainews.it-gallery-fix.css", + }, + ], + }, + }, + { + id: "bug1774005", + platform: "all", + domain: "Sites relying on window.InstallTrigger", + bug: "1774005", + contentScripts: { + matches: [ + "*://*.crunchyroll.com/*", // Bug 1777597 + "*://*.ersthelfer.tv/*", // Bug 1817520 + "*://*.webex.com/*", // Bug 1788934 + "*://ifcinema.institutfrancais.com/*", // Bug 1806423 + "*://islamionline.islamicbank.ps/*", // Bug 1821439 + "*://*.itv.com/*", // Bug 1830203 + "*://mobilevikings.be/*/registration/*", // Bug 1797400 + "*://www.schoolnutritionandfitness.com/*", // Bug 1793761 + ], + js: [ + { + file: "injections/js/bug1774005-installtrigger-shim.js", + }, + ], + 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: "bug1784141", + platform: "android", + domain: "aveeno.com and acuvue.com", + bug: "1784141", + contentScripts: { + matches: [ + "*://*.aveeno.com/*", + "*://*.aveeno.ca/*", + "*://*.aveeno.com.au/*", + "*://*.aveeno.co.kr/*", + "*://*.aveeno.co.uk/*", + "*://*.aveeno.ie/*", + "*://*.acuvue.com/*", // 1804730 + "*://*.acuvue.com.ar/*", + "*://*.acuvue.com.br/*", + "*://*.acuvue.ca/*", + "*://*.acuvue-fr.ca/*", + "*://*.acuvue.cl/*", + "*://*.acuvue.co.cr/*", + "*://*.acuvue.com.co/*", + "*://*.acuvue.com.do/*", + "*://*.acuvue.com.pe/*", + "*://*.acuvue.com.sv/*", + "*://*.acuvue.com.gt/*", + "*://*.acuvue.hn/*", + "*://*.acuvue.com.mx/*", + "*://*.acuvue.com.pa/*", + "*://*.acuvue.com.py/*", + "*://*.acuvue.com.pr/*", + "*://*.acuvue.com.uy/*", + "*://*.acuvue.com.au/*", + "*://*.acuvue.com.cn/*", + "*://*.acuvue.com.hk/*", + "*://*.acuvue.co.in/*", + "*://*.acuvue.co.id/*", + "*://acuvuevision.jp/*", + "*://*.acuvue.co.kr/*", + "*://*.acuvue.com.my/*", + "*://*.acuvue.co.nz/*", + "*://*.acuvue.com.sg/*", + "*://*.acuvue.com.tw/*", + "*://*.acuvue.co.th/*", + "*://*.acuvue.com.vn/*", + "*://*.acuvue.at/*", + "*://*.acuvue.be/*", + "*://*.fr.acuvue.be/*", + "*://*.acuvue-croatia.com/*", + "*://*.acuvue.cz/*", + "*://*.acuvue.dk/*", + "*://*.acuvue.fi/*", + "*://*.acuvue.fr/*", + "*://*.acuvue.de/*", + "*://*.acuvue.gr/*", + "*://*.acuvue.hu/*", + "*://*.acuvue.ie/*", + "*://*.acuvue.co.il/*", + "*://*.acuvue.it/*", + "*://*.acuvuekz.com/*", + "*://*.acuvue.lu/*", + "*://*.en.acuvuearabia.com/*", + "*://*.acuvuearabia.com/*", + "*://*.acuvue.nl/*", + "*://*.acuvue.no/*", + "*://*.acuvue.pl/*", + "*://*.acuvue.pt/*", + "*://*.acuvue.ro/*", + "*://*.acuvue.ru/*", + "*://*.acuvue.sk/*", + "*://*.acuvue.si/*", + "*://*.acuvue.co.za/*", + "*://*.jnjvision.com.tr/*", + "*://*.acuvue.co.uk/*", + "*://*.acuvue.ua/*", + "*://*.acuvue.com.pe/*", + "*://*.acuvue.es/*", + "*://*.acuvue.se/*", + "*://*.acuvue.ch/*", + ], + css: [ + { + file: "injections/css/bug1784141-aveeno.com-acuvue.com-unsupported.css", + }, + ], + }, + }, + { + id: "bug1784199", + platform: "all", + domain: "Sites based on Entrata Platform", + bug: "1784199", + contentScripts: { + matches: [ + "*://*.aptsovation.com/*", + "*://*.avanabayview.com/*", // #118617 + "*://*.breakpointeandcoronado.com/*", // #117735 + "*://*.liveatlasathens.com/*", // #111189 + "*://*.liveobserverpark.com/*", // #105244 + "*://*.midwayurban.com/*", // #116523 + "*://*.nhcalaska.com/*", + "*://*.prospectportal.com/*", // #115206 + "*://*.securityproperties.com/*", + "*://*.theloftsorlando.com/*", + "*://*.vanallenapartments.com/*", // #120056 + ], + css: [ + { + file: "injections/css/bug1784199-entrata-platform-unsupported.css", + }, + ], + }, + }, + { + id: "bug1795490", + platform: "android", + domain: "www.china-airlines.com", + bug: "1795490", + contentScripts: { + matches: ["*://www.china-airlines.com/*"], + js: [ + { + file: "injections/js/bug1795490-www.china-airlines.com-undisable-date-fields-on-mobile.js", + }, + ], + }, + }, + { + id: "bug1799968", + platform: "linux", + domain: "www.samsung.com", + bug: "1799968", + contentScripts: { + matches: ["*://www.samsung.com/*/watches/*/*"], + js: [ + { + file: "injections/js/bug1799968-www.samsung.com-appVersion-linux-fix.js", + }, + ], + }, + }, + { + id: "bug1799980", + platform: "all", + domain: "healow.com", + bug: "1799980", + contentScripts: { + matches: ["*://healow.com/*"], + js: [ + { + file: "injections/js/bug1799980-healow.com-infinite-loop-fix.js", + }, + ], + }, + }, + { + id: "bug1799994", + platform: "desktop", + domain: "www.vivobarefoot.com", + bug: "1799994", + contentScripts: { + matches: ["*://www.vivobarefoot.com/*"], + css: [ + { + file: "injections/css/bug1799994-www.vivobarefoot.com-product-filters-fix.css", + }, + ], + }, + }, + { + id: "bug1800000", + platform: "desktop", + domain: "www.honda.co.uk", + bug: "1800000", + contentScripts: { + matches: ["*://www.honda.co.uk/cars/book-a-service.html*"], + css: [ + { + file: "injections/css/bug1800000-www.honda.co.uk-choose-dealer-button-fix.css", + }, + ], + }, + }, + { + id: "bug1448747", + platform: "android", + domain: "FastClick breakage", + bug: "1448747", + contentScripts: { + matches: [ + "*://*.co2meter.com/*", // 10959 + "*://*.franmar.com/*", // 27273 + "*://*.themusiclab.org/*", // 49667 + "*://*.oregonfoodbank.org/*", // 53203 + "*://*.fourbarrelcoffee.com/*", // 59427 + "*://bluetokaicoffee.com/*", // 99867 + "*://bathpublishing.com/*", // 100145 + "*://dylantalkstone.com/*", // 101356 + "*://renewd.com.au/*", // 104998 + "*://*.lamudi.co.id/*", // 106767 + "*://*.thehawksmoor.com/*", // 107549 + "*://weaversofireland.com/*", // 116816 + "*://*.iledefrance-mobilites.fr/*", // 117344 + "*://*.lawnmowerpartsworld.com/*", // 117577 + "*://*.discountcoffee.co.uk/*", // 118757 + "*://torguard.net/*", // 120113 + "*://*.arcsivr.com/*", // 120716 + ], + js: [ + { + file: "injections/js/bug1448747-fastclick-shim.js", + }, + ], + }, + }, + { + id: "bug1818818", + platform: "android", + domain: "FastClick breakage - legacy", + bug: "1818818", + contentScripts: { + matches: [ + "*://*.chatiw.com/*", // 5544 + "*://*.wellcare.com/*", // 116595 + ], + js: [ + { + file: "injections/js/bug1818818-fastclick-legacy-shim.js", + }, + ], + }, + }, + { + id: "bug1819476", + platform: "all", + domain: "axisbank.com", + bug: "1819476", + contentScripts: { + matches: ["*://*.axisbank.com/*"], + js: [ + { + file: "injections/js/bug1819476-axisbank.com-webkitSpeechRecognition-shim.js", + }, + ], + }, + }, + { + id: "bug1819450", + platform: "android", + domain: "cmbchina.com", + bug: "1819450", + contentScripts: { + matches: ["*://www.cmbchina.com/*", "*://cmbchina.com/*"], + js: [ + { + file: "injections/js/bug1819450-cmbchina.com-ua-change.js", + }, + ], + }, + }, + { + id: "bug1819678", + platform: "android", + domain: "cnki.net", + bug: "1819678", + contentScripts: { + matches: ["*://*.cnki.net/*"], + js: [ + { + file: "injections/js/bug1819678-cnki.net-undisable-search-field.js", + }, + ], + }, + }, + { + id: "bug1827678-webc77727", + platform: "android", + domain: "free4talk.com", + bug: "1827678", + contentScripts: { + matches: ["*://www.free4talk.com/*"], + js: [ + { + file: "injections/js/bug1819678-free4talk.com-window-chrome-shim.js", + }, + ], + }, + }, + { + id: "bug1827678-webc119017", + platform: "desktop", + domain: "nppes.cms.hhs.gov", + bug: "1827678", + contentScripts: { + matches: ["*://nppes.cms.hhs.gov/*"], + css: [ + { + file: "injections/css/bug1819678-nppes.cms.hhs.gov-unsupported-banner.css", + }, + ], + }, + }, + { + id: "bug1830776", + platform: "all", + domain: "blueshieldca.com", + bug: "1830776", + contentScripts: { + matches: ["*://*.blueshieldca.com/*"], + js: [ + { + file: "injections/js/bug1830776-blueshieldca.com-unsupported.js", + }, + ], + }, + }, + { + id: "bug1829949", + platform: "desktop", + domain: "tomshardware.com", + bug: "1829949", + contentScripts: { + matches: ["*://*.tomshardware.com/*"], + css: [ + { + file: "injections/css/bug1829949-tomshardware.com-scrollbar-width.css", + }, + ], + }, + }, + { + id: "bug1829952", + platform: "android", + domain: "eventer.co.il", + bug: "1829952", + contentScripts: { + matches: ["*://*.eventer.co.il/*"], + css: [ + { + file: "injections/css/bug1829952-eventer.co.il-button-height.css", + }, + ], + }, + }, + { + id: "bug1830747", + platform: "android", + domain: "my.babbel.com", + bug: "1830747", + contentScripts: { + matches: ["*://my.babbel.com/*"], + css: [ + { + file: "injections/css/bug1830747-babbel.com-page-height.css", + }, + ], + }, + }, + { + id: "bug1830752", + platform: "all", + domain: "afisha.ru", + bug: "1830752", + contentScripts: { + matches: ["*://*.afisha.ru/*"], + css: [ + { + file: "injections/css/bug1830752-afisha.ru-slider-pointer-events.css", + }, + ], + }, + }, + { + id: "bug1830761", + platform: "all", + domain: "91mobiles.com", + bug: "1830761", + contentScripts: { + matches: ["*://*.91mobiles.com/*"], + css: [ + { + file: "injections/css/bug1830761-91mobiles.com-content-height.css", + }, + ], + }, + }, + { + id: "bug1830796", + platform: "android", + domain: "copyleaks.com", + bug: "1830796", + contentScripts: { + matches: ["*://*.copyleaks.com/*"], + css: [ + { + file: "injections/css/bug1830796-copyleaks.com-hide-unsupported.css", + }, + ], + allFrames: true, + }, + }, + { + id: "bug1830810", + platform: "all", + domain: "interceramic.com", + bug: "1830810", + contentScripts: { + matches: ["*://interceramic.com/*"], + css: [ + { + file: "injections/css/bug1830810-interceramic.com-hide-unsupported.css", + }, + ], + }, + }, + { + id: "bug1830813", + platform: "desktop", + domain: "onstove.com", + bug: "1830813", + contentScripts: { + matches: ["*://*.onstove.com/*"], + css: [ + { + file: "injections/css/bug1830813-page.onstove.com-hide-unsupported.css", + }, + ], + }, + }, + { + id: "bug1831007", + platform: "all", + domain: "All international Nintendo domains", + bug: "1831007", + contentScripts: { + matches: [ + "*://*.mojenintendo.cz/*", + "*://*.nintendo-europe.com/*", + "*://*.nintendo.at/*", + "*://*.nintendo.be/*", + "*://*.nintendo.ch/*", + "*://*.nintendo.co.il/*", + "*://*.nintendo.co.jp/*", + "*://*.nintendo.co.kr/*", + "*://*.nintendo.co.nz/*", + "*://*.nintendo.co.uk/*", + "*://*.nintendo.co.za/*", + "*://*.nintendo.com.au/*", + "*://*.nintendo.com.hk/*", + "*://*.nintendo.com/*", + "*://*.nintendo.de/*", + "*://*.nintendo.dk/*", + "*://*.nintendo.es/*", + "*://*.nintendo.fi/*", + "*://*.nintendo.fr/*", + "*://*.nintendo.gr/*", + "*://*.nintendo.hu/*", + "*://*.nintendo.it/*", + "*://*.nintendo.nl/*", + "*://*.nintendo.no/*", + "*://*.nintendo.pt/*", + "*://*.nintendo.ru/*", + "*://*.nintendo.se/*", + "*://*.nintendo.sk/*", + "*://*.nintendo.tw/*", + "*://*.nintendoswitch.com.cn/*", + ], + js: [ + { + file: "injections/js/bug1831007-nintendo-window-OnetrustActiveGroups.js", + }, + ], + }, + }, + { + id: "bug1836157", + platform: "android", + domain: "thai-masszazs.net", + bug: "1836157", + contentScripts: { + matches: ["*://www.thai-masszazs.net/en/*"], + js: [ + { + file: "injections/js/bug1836157-thai-masszazs-niceScroll-disable.js", + }, + ], + }, + }, + { + id: "bug1836103", + platform: "all", + domain: "autostar-novoross.ru", + bug: "1836103", + contentScripts: { + matches: ["*://autostar-novoross.ru/*"], + css: [ + { + file: "injections/css/bug1836103-autostar-novoross.ru-make-map-taller.css", + }, + ], + }, + }, + { + id: "bug1836105", + platform: "all", + domain: "cnn.com", + bug: "1836105", + contentScripts: { + matches: ["*://*.cnn.com/*"], + css: [ + { + file: "injections/css/bug1836105-cnn.com-fix-blank-pages-when-printing.css", + }, + ], + }, + }, + { + id: "bug1836177", + platform: "desktop", + domain: "clalit.co.il", + bug: "1836177", + contentScripts: { + matches: [ + "*://e-services.clalit.co.il/OnlineWeb/General/InfoFullLogin.aspx*", + ], + css: [ + { + file: "injections/css/bug1836177-clalit.co.il-hide-number-input-spinners.css", + }, + ], + allFrames: true, + }, + }, + { + id: "bug1842437", + platform: "desktop", + domain: "www.youtube.com", + bug: "1842437", + contentScripts: { + matches: ["*://www.youtube.com/*"], + js: [ + { + file: "injections/js/bug1842437-www.youtube.com-performance-now-precision.js", + }, + ], + }, + }, +]; + +module.exports = AVAILABLE_INJECTIONS; diff --git a/browser/extensions/webcompat/data/shims.js b/browser/extensions/webcompat/data/shims.js new file mode 100644 index 0000000000..8e08dd6c95 --- /dev/null +++ b/browser/extensions/webcompat/data/shims.js @@ -0,0 +1,874 @@ +/* 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"; + +/* globals module, require */ + +const AVAILABLE_SHIMS = [ + { + hiddenInAboutCompat: true, + id: "LiveTestShim", + platform: "all", + name: "Live test shim", + bug: "livetest", + file: "live-test-shim.js", + matches: ["*://webcompat-addon-testbed.herokuapp.com/shims_test.js"], + needsShimHelpers: ["getOptions", "optIn"], + }, + { + hiddenInAboutCompat: true, + id: "MochitestShim", + platform: "all", + branch: ["all:ignoredOtherPlatform"], + name: "Test shim for Mochitests", + bug: "mochitest", + file: "mochitest-shim-1.js", + matches: [ + "*://example.com/browser/browser/extensions/webcompat/tests/browser/shims_test.js", + ], + needsShimHelpers: ["getOptions", "optIn"], + options: { + simpleOption: true, + complexOption: { a: 1, b: "test" }, + branchValue: { value: true, branches: [] }, + platformValue: { value: true, platform: "neverUsed" }, + }, + unblocksOnOptIn: ["*://trackertest.org/*"], + }, + { + hiddenInAboutCompat: true, + disabled: true, + id: "MochitestShim2", + platform: "all", + name: "Test shim for Mochitests (disabled by default)", + bug: "mochitest", + file: "mochitest-shim-2.js", + matches: [ + "*://example.com/browser/browser/extensions/webcompat/tests/browser/shims_test_2.js", + ], + needsShimHelpers: ["getOptions", "optIn"], + options: { + simpleOption: true, + complexOption: { a: 1, b: "test" }, + branchValue: { value: true, branches: [] }, + platformValue: { value: true, platform: "neverUsed" }, + }, + unblocksOnOptIn: ["*://trackertest.org/*"], + }, + { + hiddenInAboutCompat: true, + id: "MochitestShim3", + platform: "all", + name: "Test shim for Mochitests (host)", + bug: "mochitest", + file: "mochitest-shim-3.js", + notHosts: ["example.com"], + matches: [ + "*://example.com/browser/browser/extensions/webcompat/tests/browser/shims_test_3.js", + ], + }, + { + hiddenInAboutCompat: true, + id: "MochitestShim4", + platform: "all", + name: "Test shim for Mochitests (notHost)", + bug: "mochitest", + file: "mochitest-shim-3.js", + hosts: ["example.net"], + matches: [ + "*://example.com/browser/browser/extensions/webcompat/tests/browser/shims_test_3.js", + ], + }, + { + hiddenInAboutCompat: true, + id: "MochitestShim5", + platform: "all", + name: "Test shim for Mochitests (branch)", + bug: "mochitest", + file: "mochitest-shim-3.js", + branches: ["never matches"], + matches: [ + "*://example.com/browser/browser/extensions/webcompat/tests/browser/shims_test_3.js", + ], + }, + { + hiddenInAboutCompat: true, + id: "MochitestShim6", + platform: "never matches", + name: "Test shim for Mochitests (platform)", + bug: "mochitest", + file: "mochitest-shim-3.js", + matches: [ + "*://example.com/browser/browser/extensions/webcompat/tests/browser/shims_test_3.js", + ], + }, + { + id: "AddThis", + platform: "all", + name: "AddThis", + bug: "1713694", + file: "addthis-angular.js", + matches: [ + "*://s7.addthis.com/icons/official-addthis-angularjs/current/dist/official-addthis-angularjs.min.js*", + ], + onlyIfBlockedByETP: true, + }, + { + id: "Adform", + platform: "all", + name: "Adform", + bug: "1713695", + file: "adform.js", + matches: [ + "*://track.adform.net/serving/scripts/trackpoint/", + "*://track.adform.net/serving/scripts/trackpoint/async/", + { + patterns: ["*://track.adform.net/Serving/TrackPoint/*"], + target: "tracking-pixel.png", + types: ["image", "imageset", "xmlhttprequest"], + }, + ], + onlyIfBlockedByETP: true, + }, + { + id: "AdNexusAST", + platform: "all", + name: "AdNexus AST", + bug: "1734130", + file: "adnexus-ast.js", + matches: ["*://*.adnxs.com/*/ast.js*"], + onlyIfBlockedByETP: true, + }, + { + id: "AdNexusPrebid", + platform: "all", + name: "AdNexus Prebid", + bug: "1713696", + file: "adnexus-prebid.js", + matches: ["*://*.adnxs.com/*/pb.js*", "*://*.adnxs.com/*/prebid*"], + onlyIfBlockedByETP: true, + }, + { + id: "AdobeEverestJS", + platform: "all", + name: "Adobe EverestJS", + bug: "1728114", + file: "everest.js", + matches: ["*://www.everestjs.net/static/st.v3.js*"], + onlyIfBlockedByETP: true, + }, + { + // keep this above AdSafeProtectedTrackingPixels + id: "AdSafeProtectedGoogleIMAAdapter", + platform: "all", + name: "Ad Safe Protected Google IMA Adapter", + bug: "1508639", + file: "adsafeprotected-ima.js", + matches: ["*://static.adsafeprotected.com/vans-adapter-google-ima.js"], + onlyIfBlockedByETP: true, + }, + { + id: "AdsByGoogle", + platform: "all", + name: "Ads by Google", + bug: "1713726", + file: "google-ads.js", + matches: [ + "*://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js", + { + patterns: [ + "*://pagead2.googlesyndication.com/pagead/*.js*fcd=true", + "*://pagead2.googlesyndication.com/pagead/js/*.js*fcd=true", + ], + target: "empty-script.js", + types: ["xmlhttprequest"], + }, + ], + onlyIfBlockedByETP: true, + }, + { + id: "AdvertisingCom", + platform: "all", + name: "advertising.com", + bug: "1701685", + matches: [ + { + patterns: ["*://pixel.advertising.com/firefox-etp"], + target: "tracking-pixel.png", + types: ["image", "imageset", "xmlhttprequest"], + onlyIfBlockedByETP: true, + }, + { + patterns: ["*://cdn.cmp.advertising.com/firefox-etp"], + target: "empty-script.js", + types: ["xmlhttprequest"], + onlyIfBlockedByETP: true, + }, + { + patterns: ["*://*.advertising.com/*.js*"], + target: "https://cdn.cmp.advertising.com/firefox-etp", + types: ["image", "imageset", "xmlhttprequest"], + onlyIfBlockedByETP: true, + }, + { + patterns: ["*://*.advertising.com/*"], + target: "https://pixel.advertising.com/firefox-etp", + types: ["image", "imageset", "xmlhttprequest"], + onlyIfBlockedByETP: true, + }, + ], + }, + { + id: "Branch", + platform: "all", + name: "Branch Web SDK", + bug: "1716220", + file: "branch.js", + matches: ["*://cdn.branch.io/branch-latest.min.js*"], + onlyIfBlockedByETP: true, + }, + { + id: "DoubleVerify", + platform: "all", + name: "DoubleVerify", + bug: "1771557", + file: "doubleverify.js", + matches: ["*://pub.doubleverify.com/signals/pub.js*"], + onlyIfBlockedByETP: true, + }, + { + id: "AmazonTAM", + platform: "all", + name: "Amazon Transparent Ad Marketplace", + bug: "1713698", + file: "apstag.js", + matches: ["*://c.amazon-adsystem.com/aax2/apstag.js"], + onlyIfBlockedByETP: true, + }, + { + id: "BmAuth", + platform: "all", + name: "BmAuth by 9c9media", + bug: "1486337", + file: "bmauth.js", + matches: ["*://auth.9c9media.ca/auth/main.js"], + onlyIfBlockedByETP: true, + }, + { + id: "Chartbeat", + platform: "all", + name: "Chartbeat", + bug: "1713699", + file: "chartbeat.js", + matches: [ + "*://static.chartbeat.com/js/chartbeat.js", + "*://static.chartbeat.com/js/chartbeat_video.js", + ], + onlyIfBlockedByETP: true, + }, + { + id: "Criteo", + platform: "all", + name: "Criteo", + bug: "1713720", + file: "criteo.js", + matches: ["*://static.criteo.net/js/ld/publishertag.js"], + onlyIfBlockedByETP: true, + }, + { + // keep this above AdSafeProtectedTrackingPixels + id: "Doubleclick", + platform: "all", + name: "Doubleclick", + bug: "1713693", + matches: [ + { + patterns: [ + "*://securepubads.g.doubleclick.net/gampad/*ad-blk*", + "*://pubads.g.doubleclick.net/gampad/*ad-blk*", + ], + target: "empty-shim.txt", + types: ["image", "imageset", "xmlhttprequest"], + }, + { + patterns: [ + "*://securepubads.g.doubleclick.net/gampad/*xml_vmap1*", + "*://pubads.g.doubleclick.net/gampad/*xml_vmap1*", + ], + target: "vmad.xml", + types: ["image", "imageset", "xmlhttprequest"], + }, + { + patterns: [ + "*://vast.adsafeprotected.com/vast*", + "*://securepubads.g.doubleclick.net/gampad/*xml_vmap2*", + "*://pubads.g.doubleclick.net/gampad/*xml_vmap2*", + ], + target: "vast2.xml", + types: ["image", "imageset", "xmlhttprequest"], + }, + { + patterns: [ + "*://securepubads.g.doubleclick.net/gampad/*ad*", + "*://pubads.g.doubleclick.net/gampad/*ad*", + ], + target: "vast3.xml", + types: ["image", "imageset", "xmlhttprequest"], + }, + ], + onlyIfBlockedByETP: true, + }, + { + id: "PBMWebAPIFixes", + platform: "all", + name: "Private Browsing Web APIs", + bug: "1773110", + runFirst: "private-browsing-web-api-fixes.js", + matches: [ + "*://*.imgur.com/js/vendor.*.bundle.js", + "*://*.imgur.io/js/vendor.*.bundle.js", + "*://www.rva311.com/static/js/main.*.chunk.js", + "*://web-assets.toggl.com/app/assets/scripts/*.js", // bug 1783919 + ], + onlyIfPrivateBrowsing: true, + }, + { + id: "Eluminate", + platform: "all", + name: "Eluminate", + bug: "1503211", + file: "eluminate.js", + matches: ["*://libs.coremetrics.com/eluminate.js"], + onlyIfBlockedByETP: true, + }, + { + id: "FacebookSDK", + platform: "all", + branches: ["nightly:android"], + name: "Facebook SDK", + bug: "1226498", + file: "facebook-sdk.js", + logos: ["facebook.svg", "play.svg"], + matches: [ + "*://connect.facebook.net/*/sdk.js*", + "*://connect.facebook.net/*/all.js*", + { + patterns: ["*://www.facebook.com/platform/impression.php*"], + target: "tracking-pixel.png", + types: ["image", "imageset", "xmlhttprequest"], + }, + ], + needsShimHelpers: ["optIn", "getOptions"], + onlyIfBlockedByETP: true, + unblocksOnOptIn: [ + "*://connect.facebook.net/*/sdk.js*", + "*://connect.facebook.net/*/all.js*", + "*://*.xx.fbcdn.net/*", // covers: + // "*://scontent-.*-\d.xx.fbcdn.net/*", + // "*://static.xx.fbcdn.net/rsrc.php/*", + "*://graph.facebook.com/v2*access_token*", + "*://graph.facebook.com/v*/me*", + "*://graph.facebook.com/*/picture*", + "*://www.facebook.com/*/plugins/login_button.php*", + "*://www.facebook.com/x/oauth/status*", + { + patterns: [ + "*://www.facebook.com/*/plugins/video.php*", + "*://www.facebook.com/rsrc.php/*", + ], + branches: ["nightly"], + }, + ], + }, + { + id: "Fastclick", + platform: "all", + name: "Fastclick", + bug: "1738220", + file: "fastclick.js", + matches: [ + "*://secure.cdn.fastclick.net/js/cnvr-launcher/*/launcher-stub.min.js*", + ], + onlyIfBlockedByETP: true, + }, + { + id: "GoogleAnalyticsAndTagManager", + platform: "all", + name: "Google Analytics and Tag Manager", + bug: "1713687", + file: "google-analytics-and-tag-manager.js", + matches: [ + "*://www.google-analytics.com/analytics.js*", + "*://www.google-analytics.com/gtm/js*", + "*://www.googletagmanager.com/gtm.js*", + ], + onlyIfBlockedByETP: true, + }, + { + id: "GoogleAnalyticsECommercePlugin", + platform: "all", + name: "Google Analytics E-Commerce Plugin", + bug: "1620533", + file: "google-analytics-ecommerce-plugin.js", + matches: ["*://www.google-analytics.com/plugins/ua/ec.js"], + onlyIfBlockedByETP: true, + }, + { + id: "GoogleAnalyticsLegacy", + platform: "all", + name: "Google Analytics (legacy version)", + bug: "1487072", + file: "google-analytics-legacy.js", + matches: ["*://ssl.google-analytics.com/ga.js"], + onlyIfBlockedByETP: true, + }, + { + id: "GoogleIMA", + platform: "all", + name: "Google Interactive Media Ads", + bug: "1713690", + file: "google-ima.js", + matches: [ + "*://s0.2mdn.net/instream/html5/ima3.js", + "*://imasdk.googleapis.com/js/sdkloader/ima3.js", + ], + onlyIfBlockedByETP: true, + }, + { + id: "GooglePageAd", + platform: "all", + name: "Google Page Ad", + bug: "1713692", + file: "google-page-ad.js", + matches: ["*://www.googleadservices.com/pagead/conversion_async.js"], + onlyIfBlockedByETP: true, + }, + { + id: "GooglePublisherTags", + platform: "all", + name: "Google Publisher Tags", + bug: "1713685", + file: "google-publisher-tags.js", + matches: [ + "*://www.googletagservices.com/tag/js/gpt.js*", + "*://pagead2.googlesyndication.com/tag/js/gpt.js*", + "*://pagead2.googlesyndication.com/gpt/pubads_impl_*.js*", + "*://securepubads.g.doubleclick.net/tag/js/gpt.js*", + "*://securepubads.g.doubleclick.net/gpt/pubads_impl_*.js*", + ], + onlyIfBlockedByETP: true, + }, + { + id: "Google SafeFrame", + platform: "all", + name: "Google SafeFrame", + bug: "1713691", + matches: [ + { + patterns: [ + "*://tpc.googlesyndication.com/safeframe/*/html/container.html", + "*://*.safeframe.googlesyndication.com/safeframe/*/html/container.html", + ], + target: "google-safeframe.html", + types: ["sub_frame"], + }, + ], + onlyIfBlockedByETP: true, + }, + { + id: "GoogleTrends", + platform: "all", + name: "Google Trends", + bug: "1624914", + custom: "google-trends-dfpi-fix", + onlyIfDFPIActive: true, + matches: [ + { + patterns: ["*://trends.google.com/trends/embed*"], + types: ["sub_frame"], + }, + ], + }, + { + id: "IAM", + platform: "all", + name: "INFOnline IAM", + bug: "1761774", + file: "iam.js", + matches: ["*://script.ioam.de/iam.js"], + onlyIfBlockedByETP: true, + }, + { + // keep this above AdSafeProtectedTrackingPixels + id: "IASPET", + platform: "all", + name: "Integral Ad Science PET", + bug: "1713701", + file: "iaspet.js", + matches: [ + "*://cdn.adsafeprotected.com/iasPET.1.js", + "*://static.adsafeprotected.com/iasPET.1.js", + ], + onlyIfBlockedByETP: true, + }, + { + id: "MNet", + platform: "all", + name: "Media.net Ads", + bug: "1713703", + file: "empty-script.js", + matches: ["*://adservex.media.net/videoAds.js*"], + onlyIfBlockedByETP: true, + }, + { + id: "Moat", + platform: "all", + name: "Moat", + bug: "1713704", + file: "moat.js", + matches: [ + "*://*.moatads.com/*/moatad.js*", + "*://*.moatads.com/*/moatapi.js*", + "*://*.moatads.com/*/moatheader.js*", + "*://*.moatads.com/*/yi.js*", + ], + onlyIfBlockedByETP: true, + }, + { + id: "Nielsen", + platform: "all", + name: "Nielsen", + bug: "1760754", + file: "nielsen.js", + matches: ["*://*.imrworldwide.com/v60.js"], + onlyIfBlockedByETP: true, + }, + { + id: "Optimizely", + platform: "all", + name: "Optimizely", + bug: "1714431", + file: "optimizely.js", + matches: [ + "*://cdn.optimizely.com/js/*.js", + "*://cdn.optimizely.com/public/*.js", + ], + onlyIfBlockedByETP: true, + }, + { + id: "Rambler", + platform: "all", + name: "Rambler Authenticator", + bug: "1606428", + file: "rambler-authenticator.js", + matches: ["*://id.rambler.ru/rambler-id-helper/auth_events.js"], + needsShimHelpers: ["optIn"], + onlyIfBlockedByETP: true, + }, + { + id: "RichRelevance", + platform: "all", + name: "Rich Relevance", + bug: "1713725", + file: "rich-relevance.js", + matches: ["*://media.richrelevance.com/rrserver/js/1.2/p13n.js"], + onlyIfBlockedByETP: true, + }, + { + id: "Firebase", + platform: "all", + name: "Firebase", + bug: "1771783", + onlyIfPrivateBrowsing: true, + runFirst: "firebase.js", + matches: [ + // bugs 1750699, 1767407 + "*://www.gstatic.com/firebasejs/*/firebase-messaging.js*", + ], + contentScripts: [ + { + cookieStoreId: "firefox-private", + js: "firebase.js", + runAt: "document_start", + matches: [ + "*://www.homedepot.ca/*", // bug 1778993 + "*://orangerie.eu/*", // bug 1758442 + "*://web.whatsapp.com/*", // bug 1767407 + "*://www.tripadvisor.com/*", // bug 1779536 + "*://www.office.com/*", // bug 1783921 + ], + }, + ], + }, + { + id: "StickyAdsTV", + platform: "all", + name: "StickyAdsTV", + bug: "1717806", + matches: [ + { + patterns: ["https://ads.stickyadstv.com/firefox-etp"], + target: "tracking-pixel.png", + types: ["image", "imageset", "xmlhttprequest"], + onlyIfBlockedByETP: true, + }, + { + patterns: [ + "*://ads.stickyadstv.com/auto-user-sync*", + "*://ads.stickyadstv.com/user-matching*", + ], + target: "https://ads.stickyadstv.com/firefox-etp", + types: ["image", "imageset", "xmlhttprequest"], + onlyIfBlockedByETP: true, + }, + ], + }, + { + id: "Vidible", + branch: ["nightly"], + platform: "all", + name: "Vidible", + bug: "1713710", + file: "vidible.js", + logos: ["play.svg"], + matches: [ + "*://*.vidible.tv/*/vidible-min.js*", + "*://vdb-cdn-files.s3.amazonaws.com/*/vidible-min.js*", + ], + needsShimHelpers: ["optIn"], + onlyIfBlockedByETP: true, + unblocksOnOptIn: [ + "*://delivery.vidible.tv/jsonp/pid=*/vid=*/*.js*", + "*://delivery.vidible.tv/placement/*", + "*://img.vidible.tv/prod/*", + "*://cdn-ssl.vidible.tv/prod/player/js/*.js", + "*://hlsrv.vidible.tv/prod/*.m3u8*", + "*://videos.vidible.tv/prod/*.key*", + "*://videos.vidible.tv/prod/*.mp4*", + "*://videos.vidible.tv/prod/*.webm*", + "*://videos.vidible.tv/prod/*.ts*", + ], + }, + { + id: "Kinja", + platform: "all", + name: "Kinja", + bug: "1656171", + contentScripts: [ + { + js: "kinja.js", + matches: [ + "*://www.avclub.com/*", + "*://deadspin.com/*", + "*://gizmodo.com/*", + "*://jalopnik.com/*", + "*://jezebel.com/*", + "*://kotaku.com/*", + "*://lifehacker.com/*", + "*://www.theonion.com/*", + "*://www.theroot.com/*", + "*://thetakeout.com/*", + "*://theinventory.com/*", + ], + runAt: "document_start", + allFrames: true, + }, + ], + onlyIfDFPIActive: true, + }, + { + id: "MicrosoftLogin", + platform: "desktop", + name: "Microsoft Login", + bug: "1638383", + requestStorageAccessForRedirect: [ + ["*://web.powerva.microsoft.com/*", "*://login.microsoftonline.com/*"], + ["*://teams.microsoft.com/*", "*://login.microsoftonline.com/*"], + ["*://*.teams.microsoft.us/*", "*://login.microsoftonline.us/*"], + ], + contentScripts: [ + { + js: "microsoftLogin.js", + matches: [ + "*://web.powerva.microsoft.com/*", + "*://teams.microsoft.com/*", + "*://*.teams.microsoft.us/*", + ], + runAt: "document_start", + }, + ], + onlyIfDFPIActive: true, + }, + { + id: "MicrosoftVirtualAssistant", + platform: "all", + name: "Microsoft Virtual Assistant", + bug: "1801277", + contentScripts: [ + { + js: "microsoftVirtualAssistant.js", + matches: ["*://publisher.liveperson.net/*"], + runAt: "document_start", + allFrames: true, + }, + ], + }, + { + id: "History", + platform: "all", + name: "History.com", + bug: "1624853", + contentScripts: [ + { + js: "history.js", + matches: ["*://play.history.com/*"], + runAt: "document_start", + }, + ], + onlyIfDFPIActive: true, + }, + { + id: "Crave.ca", + platform: "all", + name: "Crave.ca", + bug: "1746439", + contentScripts: [ + { + js: "crave-ca.js", + matches: ["*://account.bellmedia.ca/login*"], + runAt: "document_start", + }, + ], + onlyIfDFPIActive: true, + }, + { + id: "Instagram.com", + platform: "android", + name: "Instagram.com", + bug: "1804445", + contentScripts: [ + { + js: "instagram.js", + matches: ["*://www.instagram.com/*"], + runAt: "document_start", + }, + ], + onlyIfDFPIActive: true, + }, + { + id: "MaxMindGeoIP", + platform: "all", + name: "MaxMind GeoIP", + bug: "1754389", + file: "maxmind-geoip.js", + matches: ["*://js.maxmind.com/js/apis/geoip2/*/geoip2.js"], + onlyIfBlockedByETP: true, + }, + { + id: "WebTrends", + platform: "all", + name: "WebTrends", + bug: "1766414", + file: "webtrends.js", + matches: [ + "*://s.webtrends.com/js/advancedLinkTracking.js", + "*://s.webtrends.com/js/webtrends.js", + "*://s.webtrends.com/js/webtrends.min.js", + ], + onlyIfBlockedByETP: true, + }, + { + id: "Blogger", + platform: "all", + name: "Blogger", + bug: "1776869", + contentScripts: [ + { + js: "blogger.js", + matches: ["*://www.blogger.com/comment/frame/*"], + runAt: "document_start", + allFrames: true, + }, + { + js: "bloggerAccount.js", + matches: ["*://www.blogger.com/blog/*"], + runAt: "document_end", + }, + ], + onlyIfDFPIActive: true, + }, + { + // keep this below any other shims checking adsafeprotected URLs + id: "AdSafeProtectedTrackingPixels", + platform: "all", + name: "Ad Safe Protected tracking pixels", + bug: "1717806", + matches: [ + { + patterns: ["https://static.adsafeprotected.com/firefox-etp-pixel"], + target: "tracking-pixel.png", + types: ["image", "imageset", "xmlhttprequest"], + }, + { + patterns: ["https://static.adsafeprotected.com/firefox-etp-js"], + target: "empty-script.js", + types: ["xmlhttprequest"], + }, + { + patterns: [ + "*://*.adsafeprotected.com/*.gif*", + "*://*.adsafeprotected.com/*.png*", + ], + target: "https://static.adsafeprotected.com/firefox-etp-pixel", + types: ["image", "imageset", "xmlhttprequest"], + onlyIfBlockedByETP: true, + }, + { + patterns: [ + "*://*.adsafeprotected.com/*.js*", + "*://*.adsafeprotected.com/*/adj*", + "*://*.adsafeprotected.com/*/imp/*", + "*://*.adsafeprotected.com/*/Serving/*", + "*://*.adsafeprotected.com/*/unit/*", + "*://*.adsafeprotected.com/jload", + "*://*.adsafeprotected.com/jload?*", + "*://*.adsafeprotected.com/jsvid", + "*://*.adsafeprotected.com/jsvid?*", + "*://*.adsafeprotected.com/mon*", + "*://*.adsafeprotected.com/tpl", + "*://*.adsafeprotected.com/tpl?*", + "*://*.adsafeprotected.com/services/pub*", + ], + target: "https://static.adsafeprotected.com/firefox-etp-js", + types: ["image", "imageset", "xmlhttprequest"], + onlyIfBlockedByETP: true, + }, + { + // note, fallback case seems to be an image + patterns: ["*://*.adsafeprotected.com/*"], + target: "https://static.adsafeprotected.com/firefox-etp-pixel", + types: ["image", "imageset", "xmlhttprequest"], + onlyIfBlockedByETP: true, + }, + ], + }, + { + id: "SpotifyEmbed", + platform: "all", + name: "SpotifyEmbed", + bug: "1792395", + contentScripts: [ + { + js: "spotify-embed.js", + matches: ["*://open.spotify.com/embed/*"], + runAt: "document_start", + allFrames: true, + }, + ], + onlyIfDFPIActive: true, + }, +]; + +module.exports = AVAILABLE_SHIMS; diff --git a/browser/extensions/webcompat/data/ua_overrides.js b/browser/extensions/webcompat/data/ua_overrides.js new file mode 100644 index 0000000000..150d13465d --- /dev/null +++ b/browser/extensions/webcompat/data/ua_overrides.js @@ -0,0 +1,1371 @@ +/* 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"; + +/* globals browser, module, require */ + +// This is a hack for the tests. +if (typeof InterventionHelpers === "undefined") { + var InterventionHelpers = require("../lib/intervention_helpers"); +} +if (typeof UAHelpers === "undefined") { + var UAHelpers = require("../lib/ua_helpers"); +} + +/** + * For detailed information on our policies, and a documention on this format + * and its possibilites, please check the Mozilla-Wiki at + * + * https://wiki.mozilla.org/Compatibility/Go_Faster_Addon/Override_Policies_and_Workflows#User_Agent_overrides + */ +const AVAILABLE_UA_OVERRIDES = [ + { + id: "testbed-override", + platform: "all", + domain: "webcompat-addon-testbed.herokuapp.com", + bug: "0000000", + config: { + hidden: true, + matches: ["*://webcompat-addon-testbed.herokuapp.com/*"], + uaTransformer: originalUA => { + return ( + UAHelpers.getPrefix(originalUA) + + " AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36 for WebCompat" + ); + }, + }, + }, + { + /* + * Bug 1577519 - directv.com - Create a UA override for directv.com for playback on desktop + * WebCompat issue #3846 - https://webcompat.com/issues/3846 + * + * directv.com (attwatchtv.com) is blocking Firefox via UA sniffing. Spoofing as Chrome allows + * to access the site and playback works fine. This is former directvnow.com + */ + id: "bug1577519", + platform: "desktop", + domain: "directv.com", + bug: "1577519", + config: { + matches: [ + "*://*.attwatchtv.com/*", + "*://*.directv.com.ec/*", // bug 1827706 + "*://*.directv.com/*", + ], + uaTransformer: originalUA => { + return ( + UAHelpers.getPrefix(originalUA) + + " AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36" + ); + }, + }, + }, + { + /* + * Bug 1570108 - steamcommunity.com - UA override for steamcommunity.com + * WebCompat issue #34171 - https://webcompat.com/issues/34171 + * + * steamcommunity.com blocks chat feature for Firefox users showing unsupported browser message. + * When spoofing as Chrome the chat works fine + */ + id: "bug1570108", + platform: "desktop", + domain: "steamcommunity.com", + bug: "1570108", + config: { + matches: ["*://steamcommunity.com/chat*"], + uaTransformer: originalUA => { + return ( + UAHelpers.getPrefix(originalUA) + + " AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36" + ); + }, + }, + }, + { + /* + * 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/108.0.0.0 Safari/537.36" + ); + }, + }, + }, + { + /* + * Bug 1610026 - www.mobilesuica.com - UA override for www.mobilesuica.com + * WebCompat issue #4608 - https://webcompat.com/issues/4608 + * + * mobilesuica.com showing unsupported message for Firefox users + * Spoofing as Chrome allows to access the page + */ + id: "bug1610026", + platform: "all", + domain: "www.mobilesuica.com", + bug: "1610026", + config: { + matches: ["https://www.mobilesuica.com/*"], + uaTransformer: originalUA => { + return ( + UAHelpers.getPrefix(originalUA) + + " AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + ); + }, + }, + }, + { + /* + * Bug 1385206 - Create UA override for rakuten.co.jp on Firefox Android + * (Imported from ua-update.json.in) + * + * rakuten.co.jp serves a Desktop version if Firefox is included in the UA. + */ + id: "bug1385206", + platform: "android", + domain: "rakuten.co.jp", + bug: "1385206", + config: { + matches: ["*://*.rakuten.co.jp/*"], + uaTransformer: originalUA => { + return originalUA.replace(/Firefox.+$/, ""); + }, + }, + }, + { + /* + * Bug 969844 - mobile.de sends desktop site to Firefox on Android + * + * mobile.de sends the desktop site to Firefox Mobile. + * Spoofing as Chrome works fine. + */ + id: "bug969844", + platform: "android", + domain: "mobile.de", + bug: "969844", + config: { + matches: ["*://*.mobile.de/*"], + uaTransformer: _ => { + return "Mozilla/5.0 (Linux; Android 6.0.1; SM-G920F Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.91 Mobile Safari/537.36"; + }, + }, + }, + { + /* + * Bug 1509873 - zmags.com - Add UA override for secure.viewer.zmags.com + * WebCompat issue #21576 - https://webcompat.com/issues/21576 + * + * The zmags viewer locks out Firefox Mobile with a "Browser unsupported" + * message, but tests showed that it works just fine with a Chrome UA. + * Outreach attempts were unsuccessful, and as the site has a relatively + * high rank, we alter the UA. + */ + id: "bug1509873", + platform: "android", + domain: "zmags.com", + bug: "1509873", + config: { + matches: ["*://*.viewer.zmags.com/*"], + uaTransformer: originalUA => { + return ( + UAHelpers.getPrefix(originalUA) + + " AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.91 Mobile Safari/537.36" + ); + }, + }, + }, + { + /* + * Bug 1574522 - UA override for enuri.com on Firefox for Android + * WebCompat issue #37139 - https://webcompat.com/issues/37139 + * + * enuri.com returns a different template for Firefox on Android + * based on server side UA detection. This results in page content cut offs. + * Spoofing as Chrome fixes the issue + */ + id: "bug1574522", + platform: "android", + domain: "enuri.com", + bug: "1574522", + config: { + matches: ["*://enuri.com/*"], + uaTransformer: _ => { + return "Mozilla/5.0 (Linux; Android 6.0.1; SM-G900M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.111 Mobile Safari/537.36"; + }, + }, + }, + { + /* + * Bug 1574564 - UA override for ceskatelevize.cz on Firefox for Android + * WebCompat issue #15467 - https://webcompat.com/issues/15467 + * + * ceskatelevize sets streamingProtocol depending on the User-Agent it sees + * in the request headers, returning DASH for Chrome, HLS for iOS, + * and Flash for Firefox Mobile. Since Mobile has no Flash, the video + * doesn't work. Spoofing as Chrome makes the video play + */ + id: "bug1574564", + platform: "android", + domain: "ceskatelevize.cz", + bug: "1574564", + config: { + matches: ["*://*.ceskatelevize.cz/*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1577267 - UA override for metfone.com.kh on Firefox for Android + * WebCompat issue #16363 - https://webcompat.com/issues/16363 + * + * metfone.com.kh has a server side UA detection which returns desktop site + * for Firefox for Android. Spoofing as Chrome allows to receive mobile version + */ + id: "bug1577267", + platform: "android", + domain: "metfone.com.kh", + bug: "1577267", + config: { + matches: ["*://*.metfone.com.kh/*"], + uaTransformer: originalUA => { + return ( + UAHelpers.getPrefix(originalUA) + + " AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.111 Mobile Safari/537.36" + ); + }, + }, + }, + { + /* + * Bug 1598198 - User Agent extension for Samsung's galaxy.store URLs + * + * Samsung's galaxy.store shortlinks are supposed to redirect to a Samsung + * intent:// URL on Samsung devices, but to an error page on other brands. + * As we do not provide device info in our user agent string, this check + * fails, and even Samsung users land on an error page if they use Firefox + * for Android. + * This intervention adds a simple "Samsung" identifier to the User Agent + * on only the Galaxy Store URLs if the device happens to be a Samsung. + */ + id: "bug1598198", + platform: "android", + domain: "galaxy.store", + bug: "1598198", + config: { + matches: [ + "*://galaxy.store/*", + "*://dev.galaxy.store/*", + "*://stg.galaxy.store/*", + ], + uaTransformer: originalUA => { + if (!browser.systemManufacturer) { + return originalUA; + } + + const manufacturer = browser.systemManufacturer.getManufacturer(); + if (manufacturer && manufacturer.toLowerCase() === "samsung") { + return originalUA.replace("Mobile;", "Mobile; Samsung;"); + } + + return originalUA; + }, + }, + }, + { + /* + * Bug 1595215 - UA overrides for Uniqlo sites + * Webcompat issue #38825 - https://webcompat.com/issues/38825 + * + * To receive the proper mobile version instead of the desktop version or + * avoid redirect loop, the UA is spoofed. + */ + id: "bug1595215", + platform: "android", + domain: "uniqlo.com", + bug: "1595215", + config: { + matches: ["*://*.uniqlo.com/*"], + uaTransformer: originalUA => { + return originalUA + " Mobile Safari"; + }, + }, + }, + { + /* + * Bug 1622063 - UA override for wp1-ext.usps.gov + * Webcompat issue #29867 - https://webcompat.com/issues/29867 + * + * The Job Search site for USPS does not work for Firefox Mobile + * browsers (a 500 is returned). + */ + id: "bug1622063", + platform: "android", + domain: "wp1-ext.usps.gov", + bug: "1622063", + config: { + matches: ["*://wp1-ext.usps.gov/*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1697324 - Update the override for mobile2.bmo.com + * Previously Bug 1622081 - UA override for mobile2.bmo.com + * Webcompat issue #45019 - https://webcompat.com/issues/45019 + * + * Unless the UA string contains "Chrome", mobile2.bmo.com will + * display a modal saying the browser is out-of-date. + */ + id: "bug1697324", + platform: "android", + domain: "mobile2.bmo.com", + bug: "1697324", + config: { + matches: ["*://mobile2.bmo.com/*"], + uaTransformer: originalUA => { + return originalUA + " Chrome"; + }, + }, + }, + { + /* + * 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. + * Bug 1665129 - *.gruposantander.es - Add wildcard domains. + * WebCompat issue #33462 - https://webcompat.com/issues/33462 + * SuMo request - https://support.mozilla.org/es/questions/1291085 + * + * santanderbank expects UA to have 'like Gecko', otherwise it runs + * xmlDoc.onload whose support has been dropped. It results in missing labels in forms + * and some other issues. Adding 'like Gecko' fixes those issues. + */ + id: "bug1646791", + platform: "all", + domain: "santanderbank.com", + bug: "1646791", + config: { + matches: [ + "*://*.bancosantander.es/*", + "*://*.gruposantander.es/*", + "*://*.santander.co.uk/*", + ], + uaTransformer: originalUA => { + // The first line related to Firefox 100 is for Bug 1743445. + // [TODO]: Remove when bug 1743429 gets backed out. + return UAHelpers.capVersionTo99(originalUA).replace( + "Gecko", + "like Gecko" + ); + }, + }, + }, + { + /* + * Bug 1651292 - UA override for www.jp.square-enix.com + * Webcompat issue #53018 - https://webcompat.com/issues/53018 + * + * Unless the UA string contains "Chrome 66+", a section of + * www.jp.square-enix.com will show a never ending LOADING + * page. + */ + id: "bug1651292", + platform: "android", + domain: "www.jp.square-enix.com", + bug: "1651292", + config: { + matches: ["*://www.jp.square-enix.com/music/sem/page/FF7R/ost/*"], + uaTransformer: originalUA => { + return originalUA + " Chrome/83"; + }, + }, + }, + { + /* + * Bug 1666754 - Mobile UA override for lffl.org + * Bug 1665720 - lffl.org article page takes 2x as much time to load on Moto G + * + * This site returns desktop site based on server side UA detection. + * Spoofing as Chrome allows to get mobile experience + */ + id: "bug1666754", + platform: "android", + domain: "lffl.org", + bug: "1666754", + config: { + matches: ["*://*.lffl.org/*"], + uaTransformer: () => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1704673 - Add UA override for app.xiaomi.com + * Webcompat issue #66163 - https://webcompat.com/issues/66163 + * + * The page isn’t redirecting properly error message received. + * Spoofing as Chrome makes the page load + */ + id: "bug1704673", + platform: "android", + domain: "app.xiaomi.com", + bug: "1704673", + config: { + matches: ["*://app.xiaomi.com/*"], + uaTransformer: () => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1712807 - Add UA override for www.dealnews.com + * Webcompat issue #39341 - https://webcompat.com/issues/39341 + * + * The sites shows Firefox a different layout compared to Chrome. + * Spoofing as Chrome fixes this. + */ + id: "bug1712807", + platform: "android", + domain: "www.dealnews.com", + bug: "1712807", + config: { + matches: ["*://www.dealnews.com/*"], + uaTransformer: () => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1719859 - Add UA override for saxoinvestor.fr + * Webcompat issue #74678 - https://webcompat.com/issues/74678 + * + * The site blocks Firefox with a server-side UA sniffer. Appending a + * Chrome version segment to the UA makes it work. + */ + id: "bug1719859", + platform: "all", + domain: "saxoinvestor.fr", + bug: "1719859", + config: { + matches: ["*://*.saxoinvestor.fr/*"], + uaTransformer: originalUA => { + return originalUA + " Chrome/91.0.4472.114"; + }, + }, + }, + { + /* + * Bug 1722954 - Add UA override for game.granbluefantasy.jp + * Webcompat issue #34310 - https://github.com/webcompat/web-bugs/issues/34310 + * + * The website is sending a version of the site which is too small. Adding a partial + * safari iOS version of the UA sends us the right layout. + */ + id: "bug1722954", + platform: "android", + domain: "granbluefantasy.jp", + bug: "1722954", + config: { + matches: ["*://*.granbluefantasy.jp/*"], + uaTransformer: originalUA => { + return originalUA + " iPhone OS 12_0 like Mac OS X"; + }, + }, + }, + { + /* + * Bug 1738317 - Add UA override for vmos.cn + * Webcompat issue #90432 - https://github.com/webcompat/web-bugs/issues/90432 + * + * Firefox for Android receives a desktop-only layout based on server-side + * UA sniffing. Spoofing as Chrome works fine. + */ + id: "bug1738317", + platform: "android", + domain: "vmos.cn", + bug: "1738317", + config: { + matches: ["*://*.vmos.cn/*"], + uaTransformer: () => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1743627 - Add UA override for renaud-bray.com + * Webcompat issue #55276 - https://github.com/webcompat/web-bugs/issues/55276 + * + * Firefox for Android depends on "Version/" being there in the UA string, + * or it'll throw a runtime error. + */ + id: "bug1743627", + platform: "android", + domain: "renaud-bray.com", + bug: "1743627", + config: { + matches: ["*://*.renaud-bray.com/*"], + uaTransformer: originalUA => { + return originalUA + " Version/0"; + }, + }, + }, + { + /* + * Bug 1743751 - Add UA override for slrclub.com + * Webcompat issue #91373 - https://github.com/webcompat/web-bugs/issues/91373 + * + * On Firefox Android, the browser is receiving the desktop layout. + * Spoofing as Chrome works fine. + */ + id: "bug1743751", + platform: "android", + domain: "slrclub.com", + bug: "1743751", + config: { + matches: ["*://*.slrclub.com/*"], + uaTransformer: () => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1743754 - Add UA override for slrclub.com + * Webcompat issue #86839 - https://github.com/webcompat/web-bugs/issues/86839 + * + * On Firefox Android, the browser is failing a UA parsing on Firefox UA. + */ + id: "bug1743754", + platform: "android", + domain: "workflow.base.vn", + bug: "1743754", + config: { + matches: ["*://workflow.base.vn/*"], + uaTransformer: () => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1743429 - Add UA override for sites broken with the Version 100 User Agent + * + * Some sites have issues with a UA string with Firefox version 100 or higher, + * so present as version 99 for now. + */ + id: "bug1743429", + platform: "all", + domain: "Sites with known Version 100 User Agent breakage", + bug: "1743429", + config: { + matches: [ + "*://411.ca/", // #121332 + "*://*.commerzbank.de/*", // Bug 1767630 + "*://*.mms.telekom.de/*", // #1800241 + "*://ubank.com.au/*", // #104099 + "*://wifi.sncf/*", // #100194 + ], + uaTransformer: originalUA => { + return UAHelpers.capVersionTo99(originalUA); + }, + }, + }, + { + /* + * Bug 1753461 - UA override for serieson.naver.com + * Webcompat issue #99993 - https://webcompat.com/issues/97298 + * + * The site locks out Firefox users unless a Chrome UA is given, + * and locks out Linux users as well (so we use Windows+Chrome). + */ + id: "bug1753461", + platform: "desktop", + domain: "serieson.naver.com", + bug: "1753461", + config: { + matches: ["*://serieson.naver.com/*"], + uaTransformer: originalUA => { + return "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36"; + }, + }, + }, + { + /* + * Bug 1756872 - UA override for www.dolcegabbana.com + * Webcompat issue #99993 - https://webcompat.com/issues/99993 + * + * The site's layout is broken on Firefox for Android + * without a full Chrome user-agent string. + */ + id: "bug1756872", + platform: "android", + domain: "www.dolcegabbana.com", + bug: "1756872", + config: { + matches: ["*://www.dolcegabbana.com/*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1771200 - UA override for animalplanet.com + * Webcompat issue #99993 - https://webcompat.com/issues/103727 + * + * The videos are not playing and an error message is displayed + * in Firefox for Android, but work with Chrome UA + */ + id: "bug1771200", + platform: "android", + domain: "animalplanet.com", + bug: "1771200", + config: { + matches: ["*://*.animalplanet.com/video/*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1771200 - UA override for lazada.co.id + * Webcompat issue #106229 - https://webcompat.com/issues/106229 + * + * The map is not playing and an error message is displayed + * in Firefox for Android, but work with Chrome UA + */ + id: "bug1779059", + platform: "android", + domain: "lazada.co.id", + bug: "1779059", + config: { + matches: ["*://member-m.lazada.co.id/address/*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1778168 - UA override for watch.antennaplus.gr + * Webcompat issue #106529 - https://webcompat.com/issues/106529 + * + * The site's content is not loaded unless a Chrome UA is used, + * and breaks on Linux (so we claim Windows instead in that case). + */ + id: "bug1778168", + platform: "desktop", + domain: "watch.antennaplus.gr", + bug: "1778168", + config: { + matches: ["*://watch.antennaplus.gr/*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA({ + desktopOS: "nonLinux", + }); + }, + }, + }, + { + /* + * Bug 1776897 - UA override for www.edencast.fr + * Webcompat issue #106545 - https://webcompat.com/issues/106545 + * + * The site's podcast audio player does not load unless a Chrome UA is used. + */ + id: "bug1776897", + platform: "all", + domain: "www.edencast.fr", + bug: "1776897", + config: { + matches: ["*://www.edencast.fr/zoomcast*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1784361 - UA override for coldwellbankerhomes.com + * Webcompat issue #108535 - https://webcompat.com/issues/108535 + * + * An error is thrown due to missing element, unless Chrome UA is used + */ + id: "bug1784361", + platform: "android", + domain: "coldwellbankerhomes.com", + bug: "1784361", + config: { + matches: ["*://*.coldwellbankerhomes.com/*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1786404 - UA override for business.help.royalmail.com + * Webcompat issue #109070 - https://webcompat.com/issues/109070 + * + * Replacing `Firefox` with `FireFox` to evade one of their UA tests... + */ + id: "bug1786404", + platform: "all", + domain: "business.help.royalmail.com", + bug: "1786404", + config: { + matches: ["*://business.help.royalmail.com/app/webforms/*"], + uaTransformer: originalUA => { + return originalUA.replace("Firefox", "FireFox"); + }, + }, + }, + { + /* + * Bug 1790698 - UA override for wolf777.com + * Webcompat issue #103981 - https://webcompat.com/issues/103981 + * + * Add 'Linux; ' next to the Android version or the site breaks + */ + id: "bug1790698", + platform: "android", + domain: "wolf777.com", + bug: "1790698", + config: { + matches: ["*://wolf777.com/*"], + uaTransformer: originalUA => { + return originalUA.replace("Android", "Linux; Android"); + }, + }, + }, + { + /* + * Bug 1800936 - UA override for cov19ent.kdca.go.kr + * Webcompat issue #110655 - https://webcompat.com/issues/110655 + * + * Add 'Chrome;' to the UA for the site to load styles + */ + id: "bug1800936", + platform: "all", + domain: "cov19ent.kdca.go.kr", + bug: "1800936", + config: { + matches: ["*://cov19ent.kdca.go.kr/*"], + uaTransformer: originalUA => { + return originalUA + " Chrome"; + }, + }, + }, + { + /* + * 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 + * Webcompat issue #118030 - https://webcompat.com/issues/118030 + * + * Spoof the UA to receive the mobile version instead + * of the broken desktop version for Android. + */ + id: "bug1819702", + platform: "android", + domain: "feelgoodcontacts.com", + bug: "1819702", + config: { + matches: ["*://*.feelgoodcontacts.com/*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1823966 - UA override for elearning.dmv.ca.gov + * Original report: https://bugzilla.mozilla.org/show_bug.cgi?id=1823785 + */ + id: "bug1823966", + platform: "all", + domain: "elearning.dmv.ca.gov", + bug: "1823966", + config: { + matches: ["*://*.elearning.dmv.ca.gov/*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1827678 - UA override for admissions.nid.edu + * Webcompat issue #65753 - https://webcompat.com/issues/65753 + */ + id: "bug1827678-webc65753", + platform: "all", + domain: "admissions.nid.edu", + bug: "1827678", + config: { + matches: ["*://*.admissions.nid.edu/*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * 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 + * Webcompat issue #67924 - https://webcompat.com/issues/67924 + */ + id: "bug1827678-webc67924", + platform: "android", + domain: "bankmandiri.co.id", + bug: "1827678", + config: { + matches: ["*://*.bankmandiri.co.id/*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1827678 - UA override for frankfred.com + * Webcompat issue #68007 - https://webcompat.com/issues/68007 + */ + id: "bug1827678-webc68007", + platform: "android", + domain: "frankfred.com", + bug: "1827678", + config: { + matches: ["*://*.frankfred.com/*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1827678 - UA override for static.slots.lv + * Webcompat issue #68379 - https://webcompat.com/issues/68379 + */ + id: "bug1827678-webc68379", + platform: "android", + domain: "static.slots.lv", + bug: "1827678", + config: { + matches: ["*://static.slots.lv/*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1827678 - UA override for mobile.onvue.com + * Webcompat issue #68520 - https://webcompat.com/issues/68520 + */ + id: "bug1827678-webc68520", + platform: "android", + domain: "mobile.onvue.com", + bug: "1827678", + config: { + matches: ["*://mobile.onvue.com/*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1827678 - UA override for avizia.com + * Webcompat issue #68635 - https://webcompat.com/issues/68635 + */ + id: "bug1827678-webc68635", + platform: "all", + domain: "avizia.com", + bug: "1827678", + config: { + matches: ["*://*.avizia.com/*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1827678 - UA override for www.yourtexasbenefits.com + * Webcompat issue #76785 - https://webcompat.com/issues/76785 + */ + id: "bug1827678-webc76785", + platform: "android", + domain: "www.yourtexasbenefits.com", + bug: "1827678", + config: { + matches: ["*://www.yourtexasbenefits.com/*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1827678 - UA override for www.free4talk.com + * Webcompat issue #77727 - https://webcompat.com/issues/77727 + */ + id: "bug1827678-webc77727", + platform: "android", + domain: "www.free4talk.com", + bug: "1827678", + config: { + matches: ["*://www.free4talk.com/*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1827678 - UA override for watch.indee.tv + * Webcompat issue #77912 - https://webcompat.com/issues/77912 + */ + id: "bug1827678-webc77912", + platform: "all", + domain: "watch.indee.tv", + bug: "1827678", + config: { + matches: ["*://watch.indee.tv/*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1827678 - UA override for viewer-ebook.books.com.tw + * Webcompat issue #80180 - https://webcompat.com/issues/80180 + */ + id: "bug1827678-webc80180", + platform: "all", + domain: "viewer-ebook.books.com.tw", + bug: "1827678", + config: { + matches: ["*://viewer-ebook.books.com.tw/*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1827678 - UA override for jelly.jd.com + * Webcompat issue #83269 - https://webcompat.com/issues/83269 + */ + id: "bug1827678-webc83269", + platform: "android", + domain: "jelly.jd.com", + bug: "1827678", + config: { + matches: ["*://jelly.jd.com/*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1827678 - UA override for f2bbs.com + * Webcompat issue #84932 - https://webcompat.com/issues/84932 + */ + id: "bug1827678-webc84932", + platform: "android", + domain: "f2bbs.com", + bug: "1827678", + config: { + matches: ["*://f2bbs.com/*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1827678 - UA override for kt.com + * Webcompat issue #119012 - https://webcompat.com/issues/119012 + */ + id: "bug1827678-webc119012", + platform: "all", + domain: "kt.com", + bug: "1827678", + config: { + matches: ["*://*.kt.com/*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1827678 - UA override for oirsa.org + * Webcompat issue #119402 - https://webcompat.com/issues/119402 + */ + id: "bug1827678-webc119402", + platform: "all", + domain: "oirsa.org", + bug: "1827678", + config: { + matches: ["*://*.oirsa.org/*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1827678 - UA override for sistema.ibglbrasil.com.br + * Webcompat issue #119785 - https://webcompat.com/issues/119785 + */ + id: "bug1827678-webc119785", + platform: "all", + domain: "sistema.ibglbrasil.com.br", + bug: "1827678", + config: { + matches: ["*://sistema.ibglbrasil.com.br/*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1827678 - UA override for onp.cloud.waterloo.ca + * Webcompat issue #120450 - https://webcompat.com/issues/120450 + */ + id: "bug1827678-webc120450", + platform: "all", + domain: "onp.cloud.waterloo.ca", + bug: "1827678", + config: { + matches: ["*://onp.cloud.waterloo.ca/*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1830739 - UA override for casino sites + * + * The sites are showing unsupported message with the same UI + */ + id: "bug1830739", + platform: "android", + domain: "casino sites", + bug: "1830739", + config: { + matches: [ + "*://*.captainjackcasino.com/*", // 79490 + "*://*.casinoextreme.eu/*", // 118175 + "*://*.cryptoloko.com/*", // 117911 + "*://*.heapsowins.com/*", // 120027 + "*://*.planet7casino.com/*", // 120609 + "*://*.yebocasino.co.za/*", // 88409 + ], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1830821 - UA override for m.tworld.co.kr + * Webcompat issue #118998 - https://webcompat.com/issues/118998 + */ + id: "bug1830821-webc118998", + platform: "android", + domain: "m.tworld.co.kr", + bug: "1830821", + config: { + matches: ["*://m.tworld.co.kr/*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1830821 - UA override for webcartop.jp + * Webcompat issue #113663 - https://webcompat.com/issues/113663 + */ + id: "bug1830821-webc113663", + platform: "android", + domain: "webcartop.jp", + bug: "1830821", + config: { + matches: ["*://*.webcartop.jp/*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1830821 - UA override for enjoy.point.auone.jp + * Webcompat issue #90981 - https://webcompat.com/issues/90981 + */ + id: "bug1830821-webc90981", + platform: "android", + domain: "enjoy.point.auone.jp", + bug: "1830821", + config: { + matches: ["*://enjoy.point.auone.jp/*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1751604 - UA override for /www.otsuka.co.jp/fib/ + * + * The site's content is not loaded on mobile unless a Chrome UA is used. + */ + id: "bug1829126", + platform: "android", + domain: "www.otsuka.co.jp", + bug: "1829126", + config: { + matches: ["*://www.otsuka.co.jp/fib/*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1831441 - UA override for luna.amazon.com + * + * Games are unplayable unless a Chrome UA is used. + */ + id: "bug1831441", + platform: "all", + domain: "luna.amazon.com", + bug: "1831441", + config: { + matches: ["*://luna.amazon.com/*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1836109 - UA override for watch.tonton.com.my + * + * The site's content is not loaded unless a Chrome UA is used. + */ + id: "bug1836109", + platform: "all", + domain: "watch.tonton.com.my", + bug: "1836109", + config: { + matches: ["*://watch.tonton.com.my/*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1836112 - UA override for www.capcut.cn + * + * The site's content is not loaded unless a Chrome UA is used. + */ + id: "bug1836112", + platform: "all", + domain: "www.capcut.cn", + bug: "1836112", + config: { + matches: ["*://www.capcut.cn/editor*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1836116 - UA override for www.slushy.com + * + * The site's content is not loaded without a Chrome UA spoof. + */ + id: "bug1836116", + platform: "all", + domain: "www.slushy.com", + bug: "1836116", + config: { + matches: ["*://www.slushy.com/*"], + uaTransformer: originalUA => { + return originalUA + " Chrome/113.0.0.0"; + }, + }, + }, + { + /* + * Bug 1836135 - UA override for gts-pro.sdimedia.com + * + * The site's content is not loaded without a Chrome UA spoof. + */ + id: "bug1836135", + platform: "all", + domain: "gts-pro.sdimedia.com", + bug: "1836135", + config: { + matches: ["*://gts-pro.sdimedia.com/*"], + uaTransformer: originalUA => { + return originalUA.replace("Firefox/", "Fx/") + " Chrome/113.0.0.0"; + }, + }, + }, + { + /* + * Bug 1836140 - UA override for indices.iriworldwide.com + * + * The site's content is not loaded without a UA spoof. + */ + id: "bug1836140", + platform: "all", + domain: "indices.iriworldwide.com", + bug: "1836140", + config: { + matches: ["*://indices.iriworldwide.com/covid19/*"], + uaTransformer: originalUA => { + return originalUA.replace("Firefox/", "Fx/"); + }, + }, + }, + { + /* + * Bug 1836178 - UA override for atracker.pro + * + * The site's content is not loaded without a Chrome UA spoof. + */ + id: "bug1836178", + platform: "all", + domain: "atracker.pro", + bug: "1836178", + config: { + matches: ["*://atracker.pro/*"], + uaTransformer: originalUA => { + return originalUA + " Chrome/113.0.0.0"; + }, + }, + }, + { + /* + * Bug 1836181 - UA override for conference.amwell.com + * + * The site's content is not loaded unless a Chrome UA is used. + */ + id: "bug1836181", + platform: "all", + domain: "conference.amwell.com", + bug: "1836181", + config: { + matches: ["*://conference.amwell.com/*"], + uaTransformer: originalUA => { + return UAHelpers.getDeviceAppropriateChromeUA(); + }, + }, + }, + { + /* + * Bug 1836182 - UA override for www.flatsatshadowglen.com + * + * The site's content is not loaded without a Chrome UA spoof. + */ + id: "bug1836182", + platform: "all", + domain: "www.flatsatshadowglen.com", + bug: "1836182", + config: { + matches: ["*://www.flatsatshadowglen.com/*"], + uaTransformer: originalUA => { + return originalUA + " Chrome/113.0.0.0"; + }, + }, + }, +]; + +module.exports = AVAILABLE_UA_OVERRIDES; |