зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1713695 - Add a SmartBlock shim for AdForm; r=denschub,webcompat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D120913
This commit is contained in:
Родитель
2c7f95fb7c
Коммит
55d26ea80b
|
@ -97,6 +97,23 @@ const AVAILABLE_SHIMS = [
|
|||
"*://example.com/browser/browser/extensions/webcompat/tests/browser/shims_test_3.js",
|
||||
],
|
||||
},
|
||||
{
|
||||
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: "AdNexus",
|
||||
platform: "all",
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"manifest_version": 2,
|
||||
"name": "Web Compatibility Interventions",
|
||||
"description": "Urgent post-release fixes for web compatibility.",
|
||||
"version": "24.11.0",
|
||||
"version": "24.12.0",
|
||||
|
||||
"applications": {
|
||||
"gecko": {
|
||||
|
@ -90,6 +90,7 @@
|
|||
},
|
||||
|
||||
"web_accessible_resources": [
|
||||
"shims/adform.js",
|
||||
"shims/adnexus-prebid.js",
|
||||
"shims/adsafeprotected-ima.js",
|
||||
"shims/apstag.js",
|
||||
|
|
|
@ -79,6 +79,7 @@ FINAL_TARGET_FILES.features["webcompat@mozilla.org"]["injections"]["js"] += [
|
|||
]
|
||||
|
||||
FINAL_TARGET_FILES.features["webcompat@mozilla.org"]["shims"] += [
|
||||
"shims/adform.js",
|
||||
"shims/adnexus-prebid.js",
|
||||
"shims/adsafeprotected-ima.js",
|
||||
"shims/apstag.js",
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
/* 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";
|
||||
|
||||
/**
|
||||
* Bug 1713695 - Shim Adform tracking
|
||||
*
|
||||
* Sites such as m.tim.it may gate content behind AdForm's trackpoint,
|
||||
* breaking download links and such if blocked. This shim stubs out the
|
||||
* script and its related tracking pixel, so the content still works.
|
||||
*/
|
||||
|
||||
if (!window.Adform) {
|
||||
window.Adform = {
|
||||
Opt: {
|
||||
disableRedirect() {},
|
||||
getStatus(clientID, callback) {
|
||||
callback({
|
||||
clientID,
|
||||
errorMessage: undefined,
|
||||
optIn() {},
|
||||
optOut() {},
|
||||
status: "nocookie",
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
Загрузка…
Ссылка в новой задаче