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

Filters converted from Adguard are shown incorrectly in the logger #2664

Closed
hant0508 opened this issue May 30, 2017 · 12 comments
Closed

Filters converted from Adguard are shown incorrectly in the logger #2664

hant0508 opened this issue May 30, 2017 · 12 comments

Comments

@hant0508
Copy link

Describe the issue

The filter list from which the filter was taken isn't shown in the logger.

Screenshot in which the issue can be seen

2017-05-30 19-05-04

Steps for anyone to reproduce the issue

  1. Subscribe to Adguard Annoyances Filter or add this to your filters: google.ru#$#.pdp-psy > .gb_Lc.gb_g[data-ved]{display:none!important;}
  2. Visit https://google.ru
  3. Open the logger and find there ##.pdp-psy > .gb_Lc.gb_g[data-ved]:style(display:none!important;)

Your settings

  • OS/version: Debian GNU/Linux
  • Browser/version: Mozilla Firefox 53.0.3
  • uBlock Origin version: 1.12.5b17
@hant0508
Copy link
Author

hant0508 commented Jun 3, 2017

The same issue with global hiding filters starting with ~, e.g. ~example.com##div.

@gorhill gorhill reopened this Jun 3, 2017
@hant0508
Copy link
Author

hant0508 commented Jun 7, 2017

And one more case: hiding filters that contain several domains are shown correctly only on the last domain in a list. For example, rbc.ru,yandex.com,yandex.ru##.banner is shown in logger only on yandex.ru.

@gorhill
Copy link
Owner

gorhill commented Jun 7, 2017

Actually, all this is by design, not a new behavior: uBO shows you the normalized version of a filter, not the raw, un-parsed version.

So ~example.com##div is normalized to:

##div
example.com#@#div

While rbc.ru,yandex.com,yandex.ru##.banner is normalized to:

rbc.ru##.banner
yandex.com##.banner
yandex.ru##.banner

And uBO won't report these filters in the logger if the element(s) they target is not found on the page.

@hant0508
Copy link
Author

hant0508 commented Jun 7, 2017

I describe the situation when the elements are found on the page and it's reported in the logger, but user can't see any information about this filter (like on the screenshot).

There are elements named .banner on both pages rbc.ru and yandex.ru, so filter rbc.ru,yandex.ru##.banner will work on them and it will be reported in the logger, but it will be correctly reported only on the yandex.ru. And vice versa, yandex.ru,rbc.ru##.banner will show empty white rectangle on yandex.ru and will report the information correctly on rbc.ru.

@gorhill
Copy link
Owner

gorhill commented Jun 7, 2017

white rectangle on yandex.ru

I can't get the yandex.ru to report something about .banner, and using the dev console document.querySelector('.banner'); returns null.

@gorhill
Copy link
Owner

gorhill commented Jun 7, 2017

Ok never mind, I swapped yandex.ru and rbc.ru and went to http://www.rbc.ru/ and can now reproduce the issue.

@hant0508
Copy link
Author

hant0508 commented Jun 7, 2017

Just tested it on rbc.ru:

  1. rbc.ru##.banner

2017-06-08 00-05-17
2. yandex.ru,rbc.ru##.banner

2017-06-08 00-14-01
3. rbc.ru,yandex.ru##.banner

2017-06-08 00-06-14

I can't get the yandex.ru to report something about .banner

My mistake, there's a ###banner on yandex.ru, but the same problem occurs. An example filter rbc.ru,yandex.com,yandex.ru##.banner was taken as a part of a very long filter form Adguard Russian Filters.

@gorhill gorhill closed this as completed in 2c9c98e Jun 7, 2017
@hant0508
Copy link
Author

uBO shows you the normalized version of a filter, not the raw, un-parsed version.

So there's one more issue with the logger.

  1. Subscribe to RUS: RU AdList
  2. Visit https://rsload.net
  3. Open the logger and find csp

2017-06-11 12-47-05

@Halibut80
Copy link

So there's one more issue with the logger.

@hant05080 Maybe you need to fill separate issue for that?

As temporally fix, style for Stylish/userContent.css:

@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document url-prefix("chrome://ublock0/content/logger-ui.html") {
    #filterFinderDialog .dialog code {
        max-height: 40vh !important;
        overflow: auto !important;
        display: inline-block !important;
        vertical-align: -6px !important;
    }
}

@gwarser
Copy link
Contributor

gwarser commented Oct 5, 2017

2c9c98e introduced regression in logger.
On my system (Firefox ~85k cosmetic filters) up to 7 seconds is needed for cosmetic filter details layer/dialog to appear after I click on it.

In Chromium, this is about 2s.

@gorhill
Copy link
Owner

gorhill commented Oct 6, 2017

Does the 7-second delay occur only the first time you lookup the filter, or does it happens also if you lookup again immediately?

@gwarser
Copy link
Contributor

gwarser commented Oct 6, 2017

Happens every time, but may be little random in length - more like between 4 and 10 seconds.

This is visible in Chromium profiler in worker thread as regex.

image

Also on my phone, this is like 40 seconds! :(

I found this commit by git bisect, then "Load Temporary Add-on" in about:debugging in Firefox ESR.

For simple filter:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants