To switch some filter

Posting here is no longer possible, please use the forum of a filter list project, such as EasyList
Locked
mrocha
Posts: 8
Joined: Fri Apr 17, 2015 7:00 pm

To switch some filter

Post by mrocha »

I use Adblock 2.0.3, and I use an button posted by Wladimir Palant, to switch an filter, this button is for firefox plugin called Custom Buttons, if I click in this button it disable an filter, if click newly reenable, someone in this forum can do some changes in this button to change the image when enabled and other image when disabled, and to show correct image when restart firefox, Custom Buttons have option to use initialization codes. The Adblock 2.0.3 is last version than this button work, and as the button is extremely useful to me I continue using this version. Thanks

The button is :

var filter = Components.utils.import("chrome://adblockplus-modules/content/FilterClasses.jsm", null)
.Filter.fromText("examplefilter");
filter.disabled = !filter.disabled;
MonztA
ABP Developer
Posts: 3957
Joined: Mon Aug 14, 2006 12:18 am
Location: Germany

Re: To switch some filter

Post by MonztA »

Individual filters on a page can be disabled easily via right-click in the blockable items list if that's what you mean.
mrocha
Posts: 8
Joined: Fri Apr 17, 2015 7:00 pm

Re: To switch some filter

Post by mrocha »

But I need switch this filter many times, and for all sites, some times ON, some times OFF, someone can help with this buttom?
User avatar
greiner
ABP Developer
Posts: 900
Joined: Mon Sep 03, 2012 5:29 pm
Location: Cologne, Germany

Re: To switch some filter

Post by greiner »

This part of the code was removed when Adblock Plus was rewritten to become a restartless extension. However, you should be able to use the IAdblockPlus interface for that purpose to add and remove filters.
Locked