gorhill / uBlock

uBlock Origin - An efficient blocker for Chromium and Firefox. Fast and lean.
GNU General Public License v3.0
44.49k stars 2.99k forks source link

Improve google-ima shim script #3899

Closed kzar closed 8 months ago

kzar commented 8 months ago

We made use of the google-ima shim script from uBlock in the DuckDuckGo Privacy Essentials extension recently, but found a few issues with website breakage. After debugging and fixing those[1], I thought it would be worth sharing the improvements back again. Issues we ran into:

1 - https://github.com/duckduckgo/tracker-surrogates/commit/52f2999523ae0aeacaeb57937b2f790b886d12c1 2 - https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima.AdDisplayContainer 3 - https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima.Ad#getUniversalAdIds 4 - https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima.UniversalAdIdInfo#getAdIdValue 5 - https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima#.OmidVerificationVendor

kzar commented 8 months ago

@gorhill Can you just check the changes pass linting for me? I didn't get a chance to check that my end, and I was expecting it to be checked automatically with some CI.

gorhill commented 8 months ago

Yes, linting pass, I will merge as is, thanks for the fixes.