Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix various intergi sites #2867

Closed
wants to merge 15 commits into from
8 changes: 7 additions & 1 deletion src/data/surrogates.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ const hostnames = {
],
widgetName: "YouTube"
},
'cdn.intergient.com': {
match: MATCH_SUFFIX,
tokens: ['/ramp_core.js'],
}
};

/**
Expand Down Expand Up @@ -177,6 +181,8 @@ const surrogates = {
'/player_api': 'youtube.js',

'/omweb-v1.js': 'noop.js',

'/ramp_core.js': 'ramp.js',

'noopjs': 'noop.js'
};
Expand All @@ -194,4 +200,4 @@ export default {
MATCH_SUFFIX,
hostnames,
surrogates,
};
};
17 changes: 17 additions & 0 deletions src/data/web_accessible_resources/ramp.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// https://developers.playwire.com/api/docs/ads/getting-started-ads.html
// https://github.com/EFForg/privacybadger/pull/2865#issuecomment-1355151256
(function () {
function noopfn() {}
function checkForOnReady() {
if (!window.ramp) {
window.ramp = {};
}
window.ramp.addUnits = () => new Promise(noopfn);
window.ramp.displayUnits = noopfn;
window.ramp.destroyUnits = noopfn;
if (typeof window.ramp.onReady == "function") {
window.ramp.onReady();
}
}
setTimeout(checkForOnReady, 10);
})();