Skip to content

Commit

Permalink
Bug 1723533 - Improve the ETP shim for Google Ads; r=denschub,webcomp…
Browse files Browse the repository at this point in the history
…at-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D121748
  • Loading branch information
wisniewskit committed Aug 4, 2021
1 parent 7be94b4 commit 98d331c
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 1 deletion.
2 changes: 1 addition & 1 deletion browser/extensions/webcompat/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "Web Compatibility Interventions",
"description": "Urgent post-release fixes for web compatibility.",
"version": "25.1.0",
"version": "25.2.0",

"applications": {
"gecko": {
Expand Down
54 changes: 54 additions & 0 deletions browser/extensions/webcompat/shims/google-ads.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,57 @@ if (window.adsbygoogle?.loaded === undefined) {
push() {},
};
}

if (window.gapi?._pl === undefined) {
const stub = {
go() {},
render: () => "",
};
window.gapi = {
_pl: true,
additnow: stub,
autocomplete: stub,
backdrop: stub,
blogger: stub,
commentcount: stub,
comments: stub,
community: stub,
donation: stub,
family_creation: stub,
follow: stub,
hangout: stub,
health: stub,
interactivepost: stub,
load() {},
logutil: {
enableDebugLogging() {},
},
page: stub,
partnersbadge: stub,
person: stub,
platform: {
go() {},
},
playemm: stub,
playreview: stub,
plus: stub,
plusone: stub,
post: stub,
profile: stub,
ratingbadge: stub,
recobar: stub,
savetoandroidpay: stub,
savetodrive: stub,
savetowallet: stub,
share: stub,
sharetoclassroom: stub,
shortlists: stub,
signin: stub,
signin2: stub,
surveyoptin: stub,
visibility: stub,
youtube: stub,
ytsubscribe: stub,
zoomableimage: stub,
};
}

0 comments on commit 98d331c

Please sign in to comment.