Comments (3)
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.
@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.
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)
- Convert $all to $doc like uBO HOT 1
- support AdGuard scriptlet syntax HOT 1
- Will adblock-rust continue to work after Chrome Manifest V3? HOT 3
- `:style()` action operator doesn't work great with some `::-webkit-*` pseudo-classes, if other pseudo classes are used/need in the same rule.
- Support for `$specifichide`
- YouTube blocks default Brave now HOT 2
- Ag filters support of Brave Shields.
- Copyright confusion HOT 9
- Investigate using upstream `url` parser
- uBlock filter not working on Brave, works on Firefox + uBlock HOT 2
- Missing `from` support on `content_blocking.rs` causes crashes
- Wrong types for js bindings HOT 2
- Dependency Dashboard
- Return all filters which blocks the request HOT 1
- Allow specific YouTube channels with the AdBlock HOT 2
- crate.io website doc license tag needs an update
- `$to` support
- Element hiding rules (cosmetic filters) do not work with regex
- `removeparam` with no resource types should only apply to document, subdocument, and XHR HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adblock-rust.