Comments (5)
@ductridev can you explain more about what this might look like? You want to replace images on pages with... some other image? What images would you be using as replacements?
FWIW, this technically sorta used to be possible using background-image: url
CSS style injection filters, but it's a potential privacy leak and so it's definitely not possible in the major adblockers these days.
from adblock-rust.
@antonok-edm by default, the ad block will inject the hidden stylesheet to hide the ad elements, but I don't want it, I'm building an electron app and it will break some pages when my customers try to access it from my electron apps, so I want to replace the hidden stylesheet with any images which can be configured by my customers.
from adblock-rust.
I hope we can have a function to set the stylesheet injection instead of adding it to filters because we will need to keep the filter up to date at EasyList of AdBlockPlus or some EasyList which is hosted on the Internet.
from adblock-rust.
@ductridev generally adblock-rust
doesn't return any stylesheets, just sets of selectors that should be hidden (see https://docs.rs/adblock/latest/adblock/engine/struct.Engine.html#cosmetic-filtering for more details). If you're embedding this into an electron app, you're free to do anything you want with those selectors, including using replacement images.
from adblock-rust.
@antonok-edm thank you, I will try this right away. I will reopen if there is another problems.
from adblock-rust.
Related Issues (20)
- `domain` regex syntax
- enforce values on network filter options when possible
- Possible to embed into Firefox ? HOT 2
- Proposal: Browser-level element hiding HOT 4
- Support for `Permissions-Policy` modifier
- 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
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.