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

Ghostery 10: Simple custom filters editor #1354

Merged
merged 4 commits into from
Mar 29, 2024
Merged

Ghostery 10: Simple custom filters editor #1354

merged 4 commits into from
Mar 29, 2024

Conversation

chrmod
Copy link
Member

@chrmod chrmod commented Oct 25, 2023

fix #22

A custom filter editor is a way for filter maintainers and users to apply and test their own adblocking rules.

Initial rollout will have it hidden in the "developer section". In near future this will become available to all users.

@chrmod chrmod self-assigned this Feb 2, 2024
@chrmod chrmod force-pushed the custom-filters branch 2 times, most recently from 8b1067d to 67098e4 Compare February 27, 2024 13:28
@chrmod chrmod force-pushed the custom-filters branch 5 times, most recently from c969c99 to 6275d92 Compare March 25, 2024 11:09
@chrmod chrmod marked this pull request as ready for review March 25, 2024 11:09
@chrmod chrmod requested a review from smalluban March 25, 2024 11:35
@smalluban smalluban changed the title Ghostery 10: simple custom filters editor Simple custom filters editor Mar 26, 2024
@smalluban smalluban added the v10 label Mar 26, 2024
@smalluban smalluban marked this pull request as draft March 27, 2024 13:41
@smalluban smalluban force-pushed the custom-filters branch 2 times, most recently from 62fdc7e to b55f711 Compare March 27, 2024 13:43
@smalluban
Copy link
Collaborator

Something is wrong specifically in Safari with page <-> BG communication on custom filters update - I'm trying to find what, that's why I have changed the PR to draft.

@@ -14,7 +14,7 @@ export default function asyncSetup(promises, threshold = 5000) {

const result = {
pending: Promise.race([
Promise.all(promises),
Copy link
Member Author

Choose a reason for hiding this comment

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

why is this needed?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I was in one of the implementation when I was passing ternary in adblocker.js - but it is not now, I'll clean it up.

@smalluban smalluban force-pushed the custom-filters branch 2 times, most recently from c02d363 to ebbf464 Compare March 28, 2024 08:53
@smalluban smalluban marked this pull request as ready for review March 28, 2024 08:56
@smalluban
Copy link
Collaborator

@chrmod PR ready to be re-reviewed ;)

const dnrRules = [];
const dnrErrors = [];
const results = await Promise.allSettled(
[...networkFilters].map((filter) => converter.convert(filter)),
Copy link
Member Author

Choose a reason for hiding this comment

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

no need for array spread

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's a Set. Look above. I've changed that to simply remove duplicated filters (I discovered them while testing).

@chrmod chrmod added Type: Feature Enhancement Ad-Blocking Issues releated to Ad Blocking labels Mar 29, 2024
@chrmod chrmod merged commit 70d0123 into main Mar 29, 2024
4 checks passed
@chrmod chrmod deleted the custom-filters branch March 29, 2024 09:46
@chrmod chrmod changed the title Simple custom filters editor Ghostery 10: Simple custom filters editor Mar 29, 2024
@smalluban smalluban mentioned this pull request Apr 5, 2024
@Kees1958
Copy link

@chrmod I installed Ghostery today, but can't find the "Simple custom filters editor" where can I test/try it?

@smalluban
Copy link
Collaborator

smalluban commented Jun 26, 2024

@Kees1958 This is currently behind the developer tools flag. It means that it is in internal testing phase.

However, if you want to check it out, click 5 times version of the extension on the home page of the settings.

@Kees1958
Copy link

Kees1958 commented Jun 26, 2024

@smalluban Thanks for the fast response.

URL filters blocking and cosmetic hiding seems to work well, so that is great.

This is really great for cleaning leftovers on my favorite news websites. Thanks a lot for providing this feature.

Two minor remarks

  1. Comment not recognized ! at beginning of rule (results in an error), but that is no big deal for pre-release version
  2. Looks like the error message is not cleared when there no more errors after update, but that is also minor GUI-twitch

On Linux Mint using Ungoogled Chromium I switched from AdBlockPlus to Ghostery

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

Successfully merging this pull request may close these issues.

[UPDATE] Allow additional Ad Blocker filters
3 participants