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

fix cosmetic filtering #3121

Merged
merged 2 commits into from
Aug 9, 2019
Merged

fix cosmetic filtering #3121

merged 2 commits into from
Aug 9, 2019

Conversation

Snuupy
Copy link
Contributor

@Snuupy Snuupy commented Aug 8, 2019

Submitter Checklist:

This PR depends on #3002

Fixes cosmetic filtering for tabs loaded in background

Fix brave/brave-browser#5215 (blocking in background tabs)

Fixes stylesheet injection for cosmetic filtering

Fix brave/brave-browser#3041
Fix brave/brave-browser#4348
Fix brave/brave-browser#4338

address brave/brave-browser#94 (comment)

Test Plan:

Background tabs

Open http://raymondhill.net/ublock/adbox.html
Right click, enter .ADBox in the field
Bookmark page
Right click bookmark and open as a tab
Switch to new tab and verify that the element is blocked when you switch to it

Cosmetic filtering stylesheet injection

Block element with !important html tag or is asynchronously added to the webpage (ex. reddit/facebook with filters added) and see that those ads are blocked.

    1. Visit https://new.reddit.com/
    1. add .promotedlink to filter
    1. scroll down to see promoted links/advertisements (master will not be able to block the promoted links, but this PR will)

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.

@Snuupy Snuupy added CI/skip-android Do not run CI builds for Android CI/skip-ios Do not run CI builds for iOS labels Aug 8, 2019
@Snuupy Snuupy self-assigned this Aug 8, 2019
@petemill
Copy link
Member

petemill commented Aug 9, 2019

Since this PR was rebased, but #3002 was not, and this PR contains the commit from #3002, and CI passed for this PR, I'm going to close #3002 and merge the commits via this PR, including the issues that both PRs fix in this one.

@petemill petemill changed the title fix cosmetic filtering for tabs loaded in background fix cosmetic filtering Aug 9, 2019
@petemill petemill added this to the 0.70.x - Nightly milestone Aug 9, 2019
Copy link
Member

@petemill petemill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/skip-android Do not run CI builds for Android CI/skip-ios Do not run CI builds for iOS
Projects
None yet
2 participants