Coder Social home page Coder Social logo

Comments (3)

thirumurugan-git avatar thirumurugan-git commented on August 11, 2024

Hi @antonok-edm ,

I’d like to contribute to resolving this issue. Could you please share your plans for addressing it?

As it stands, remove_classes and remove_attrs in UrlSpecificResources manage the removal of attributes and classes for specific URLs. These properties are hash maps where the key is a selector and the value is a vector of attributes or classes to be removed.

Is the issue related to parsing, or is it about setting the type (e.g., regex or quoted syntax) in the UrlSpecificResources object for the remove_attrs and remove_classes properties? Could you please elaborate?

Thank you!

from adblock-rust.

antonok-edm avatar antonok-edm commented on August 11, 2024

@thirumurugan-git hi, thanks for your interest!

One thing to note is that there are significant changes coming here from the next branch, which I expect to be merged within a week or so. That includes support for procedural filters, but also reworks how these filters are represented (i.e. remove_classes and remove_attrs are just going to be stored in a flat array of procedural filters, each distinguished by an "action" field).

Aside from that - I believe the parsing part should be fairly simple. IIRC, I've just skipped over any filters where the remove-attr or remove-class field starts with a /. I wasn't sure what the best way to represent these filters was at the time, but I think the simplest thing is to stop skipping them and pass the strings directly as-is to the in-page content script, which can detect them and operate accordingly.

adblock-rust is used by a couple of other projects which may have their own content script implementations, but if you're interested in making that work specifically in Brave Browser, the relevant code is located here.

from adblock-rust.

thirumurugan-git avatar thirumurugan-git commented on August 11, 2024

Hi @antonok-edm ,

Thank you for your prompt response. I believe this issue will be addressed in your next branch, as you have methods like forbid_regex_or_quoted_args to tackle it. If it isn’t resolved in the next branch, I am ready to fix it post-merge.

Could you share a good starting point for contributing to the adblocker? I plan to add support for AdGuard syntax, which is currently lacking in adblock-rust. Do you have any suggestions for this?

I understand that starting after the next branch merge might be more efficient due to the major modifications to the procedural filter. Do you think adding support for AdGuard syntax would be feasible without waiting for this merge?

Also, could you list the projects currently using this adblocker so I can code with those in mind?

Thanks!

from adblock-rust.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.