Skip to content

Cosmetic filter fails to hide element #1015

@gorhill

Description

@gorhill

Repro steps:

  • Go to https://en.wikipedia.org/wiki/Main_Page.
  • A large notice should appear at the top.
    • If not, clear all cookies for the site, refresh the page.
  • In "My filters" pane, manually enter the following cosmetic filter: en.wikipedia.org###centralNotice.
  • Refresh the above web page.
  • Result: the large notice is still visible.

Cause:

The DOM element #centralNotice has a style property display: block !important, and that CSS rule is part of a style tag which is inserted after uBO has inserted its own style which contains site-specific cosmetic filters -- so essentially uBO's CSS rules are overriden by the page's own rules.

Solution: prepend all inserted CSS rules for cosmetic filtering purpose with html, to augment one notch the specificity of uBO's CSS rules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions