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

Cosmetic rules not logged for embedded YouTube videos #102

Closed
5 of 8 tasks
joey04 opened this issue Jun 28, 2018 · 4 comments
Closed
5 of 8 tasks

Cosmetic rules not logged for embedded YouTube videos #102

joey04 opened this issue Jun 28, 2018 · 4 comments
Labels
bug Something isn't working fixed issue has been addressed

Comments

@joey04
Copy link

joey04 commented Jun 28, 2018

Prerequisites

  • I verified that this is not a filter issue
  • This is not a support issue or a question
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue
    • Your issue may already be reported.
  • I tried to reproduce the issue when...
    • uBlock Origin is the only extension
    • uBlock Origin with default lists/settings
    • using a new, unmodified browser profile
  • I am running the latest version of uBlock Origin
  • I checked the documentation to understand that the issue I report is not a normal behavior

Description

Cosmetic rules for embedded YouTube videos are not logged. They're properly applied by uBO but not logged. (Also note that request filtering is properly logged, only cosmetics are missing.)

I recently switched from legacy uBO to WebExt, and this was not an issue on legacy. (I have a number of my own Youtube cosmetic rules and was accustomed to seeing them appear as a cluster in the logger for embedded videos.)

A specific URL where the issue occurs

https://developers.google.com/youtube/youtube_player_demo

Steps to Reproduce

  1. add youtube.com##.ytp-pause-overlay and open the logger
  2. open the link, play the video, then pause it. No "More videos" overlay should appear because it's hidden by the rule.
  3. comment out the rule, reload the page, play the video again, then pause it. Now the large "More videos" overlay appears on the video.
  4. In the logger, the rule will not appear.

uBlock Origin 1.16.10
same issue on Firefox 60 and Chrome 67

@uBlock-user
Copy link
Contributor

uBlock-user commented Jun 28, 2018

Probably related to the fact that the picker cannot dig into iframes?

Will happen on every website where youtube videos are embedded for example - http://terrillthompson.com/tests/youtube.html

@joey04
Copy link
Author

joey04 commented Jun 28, 2018

Probably related to the fact that the picker cannot dig into iframes?

It may be related, but I just confirmed on Pale Moon 27 that logging is done for the STR scenario. (The logger has the above rule plus the others I have for youtube.com)

However, the element picker is the same problem for all browsers. Pale Moon uBO fork can't drill into the iframe either. So that confirms why I filed a separate issue (that's a duplicate of an old one I was unaware of).

Note: on Pale Moon I have my own legacy fork based on uBO 1.14.16. So perhaps something changed in uBO since then causing this lack of logging now.

@uBlock-user
Copy link
Contributor

Not just limited to youtube either, happens on with video hosting websites wherever embedded, and script:inject filters are still logged too.

@gorhill
Copy link
Member

gorhill commented Jun 29, 2018

Problem is that when uBO injects its cosmetic logging code, the youtube.com iframe does not yet exist, it is created afterward -- and the cosmetic logging code is injected once at the top document level and all_frames is used to have the logging code injected into every child iframes. However this means future child iframes won't be injected into.

It's something I wanted to revised anyway since a while, the cosmetic logging code should be injected once on demand for every frame.

@uBlock-user uBlock-user added the fixed issue has been addressed label Jul 4, 2018
@gorhill gorhill changed the title cosmetic rules Not Logged for embedded YouTube videos Cosmetic rules not logged for embedded YouTube videos Jul 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed issue has been addressed
Projects
None yet
Development

No branches or pull requests

3 participants