uBlockOrigin / uBlock-issues

This is the community-maintained issue tracker for uBlock Origin
https://github.com/gorhill/uBlock
922 stars 77 forks source link

Add ati-smarttag and google-ima3 redirect resources #2158

Open Yuki2718 opened 2 years ago

Yuki2718 commented 2 years ago

Prerequisites

I tried to reproduce the issue when...

Description

AG implementation: https://github.com/AdguardTeam/Scriptlets/blob/master/wiki/about-redirects.md#ati-smarttag https://github.com/AdguardTeam/Scriptlets/blob/master/wiki/about-redirects.md#google-ima3

They often cause problems and exception have been made each time. If the redirect resources work without problem, maybe we can generally redirect and reduce the freuqency of those problems. Even if not, at least we can reduce exposure to these services by domain-specific redirect rules with $important.

A specific URL where the issue occurs

https://www.rte.ie/news/business/2022/0626/1306958-one-third-of-households-just-making-ends-meet/

Steps to Reproduce

  1. For ati-smarttag visit the URL, see embedded player is working with default setting thx to exception.
  2. If you add ||tag.aticdn.net/$script,domain=rte.ie,important, the player will be broken.
  3. If you visit the URL with AG, you'll see working player without exception (as I added the rule in https://github.com/AdguardTeam/AdguardFilters/commit/cb87af87422c8414300a3cf7a1860f302493501d)

Expected behavior

NA

Actual behavior

Exception is often made for these two.

uBlock Origin version

1.43.1b3

Browser name and version

Firefox 101.0.1

Operating System and version

Windows 10

krystian3w commented 2 years ago

Duplicate of topic from hidden volunteer github team ~6 months ago?

Yuki2718 commented 2 years ago

Example for ima3: https://github.com/AdguardTeam/AdguardFilters/issues/123100 apparently doesn't work currently Non-working case: http://yahoo-jp.portal.connectedgamestore.com/game?gameId=0704-nimble_fish

krystian3w commented 2 years ago

I see typo: , mayb we also we should link topic form volunteer "chat".

gorhill commented 2 years ago

Firefox has a shim for ima3: https://searchfox.org/mozilla-central/source/browser/extensions/webcompat/shims/google-ima.js#6.

I should just borrow it I guess. It would be nice to have these shims exposed to any API so that extensions can use them.

I need to evaluate if MPLv2 is compatible with GPLv3. Answer, yes

Yuki2718 commented 2 years ago

Looks compatible: https://www.gnu.org/licenses/license-list.en.html#MPL-2.0 https://opensource.stackexchange.com/questions/11868/can-i-use-source-code-released-under-mpl-2-0-in-a-software-released-under-gplv3

krystian3w commented 2 years ago

@mozilla fyi!

gorhill commented 2 years ago

I can't use Mozilla's version as is it turns out because it uses JS syntax (private properties) that is valid starting with Chromium 74/Firefox 90 -- so I will have to modify to avoid relying on this private field syntax.

Additionally, I used this test case where I recently excepted ima3 to bypass anti-blocker to validate that it works:

Without shim, anti-blocker message.

Add filter (need priority to win against the existing redirect in uBO's lists):

||imasdk.googleapis.com/js/sdkloader/ima3.js$3p,redirect-rule=google-ima.js:1

Reload and click play button: still an anti-blocker message. There is a missing event in Firefox's version, and when I add this missing event, the shim works.

gorhill commented 2 years ago

@wisniewskit

For your interest, I had to add the event CONTENT_RESUME_REQUESTED in start() to unbreak the case detailed above.

wisniewskit commented 2 years ago

@gorhill, thanks for letting me know, and sorry for the extra porting work!

Yuki2718 commented 1 year ago

Steps to reproduce (or steps to just watch video) is very tedious, but in https://github.com/easylist/easylist/issues/16535 I found redirecting causes pausing video not to work. Was there any similar problem?

stephenhawk8054 commented 1 year ago

Steps to reproduce (or steps to just watch video) is very tedious, but in easylist/easylist#16535 I found redirecting causes pausing video not to work. Was there any similar problem?

Yes, redirecting google-ima sometimes still cause breakages. Looks like each site can have slightly different coding with it. Some other discussions here: https://github.com/uBlockOrigin/uBlock-issues/issues/2265


Does your console throw any errors related to it?

Yuki2718 commented 1 year ago

Does your console throw any errors related to it?

I don't see anything related to imasdk.