Export Custom Filters

Everything about using Adblock Plus on Mozilla Firefox, Thunderbird and SeaMonkey
Post Reply
gmaria
Posts: 3
Joined: Sat Oct 14, 2017 8:25 pm

Export Custom Filters

Post by gmaria »

I have a long list of custom filters that I would like to export and import to a new computer. I can't seem to find any way to do this, or any forum topics about it. The old adblock plus had a backup feature which doesn't seem to exist anymore. Is it possible to save my list somehow, or do I just have to start my custom filters all over from scratch? Thanks.
User avatar
greiner
ABP Developer
Posts: 899
Joined: Mon Sep 03, 2012 5:29 pm
Location: Cologne, Germany

Re: Export Custom Filters

Post by greiner »

There's ui#159 for reintroducing the import/export feature in the settings page. Until then, there are two ways that I can think of to backup your filters:

Custom filters backup
1. Open the Advanced tab in the settings page.
2. Select all filters by clicking on the checkbox in the top-left corner of the custom filters table.
3. Click on "Copy selected" button that appears below the table.
4. Paste into a text file.

Filter settings backup (incl. custom filters)
1. Open "about:debugging".
2. Click on "Inspect" next to Adblock Plus list item.
3. Run the code below to retrieve the filter settings:

Code: Select all

let settings = await browser.storage.local.get("file:patterns.ini");
4. Run the code below to copy them:

Code: Select all

copy(settings["file:patterns.ini"].content.join("\n"));
5. Paste into a text file.
am_dew
Posts: 5
Joined: Sat Aug 17, 2019 1:56 am

Re: Export Custom Filters

Post by am_dew »

How do you import your list once they have been export to the text file?

Thank you.
User avatar
greiner
ABP Developer
Posts: 899
Joined: Mon Sep 03, 2012 5:29 pm
Location: Cologne, Germany

Re: Export Custom Filters

Post by greiner »

You can paste your filters into the "Search or add filter(s)" input field to import them.
am_dew
Posts: 5
Joined: Sat Aug 17, 2019 1:56 am

Re: Export Custom Filters

Post by am_dew »

greiner wrote:You can paste your filters into the "Search or add filter(s)" input field to import them.
Thank you. I did not realize I could paste my entire list of filters into that box.
Hitchhiker
Posts: 13
Joined: Mon Sep 28, 2020 11:26 am
Location: The Netherlands

Re: Export Custom Filters

Post by Hitchhiker »

greiner wrote:There's ui#159 for reintroducing the import/export feature in the settings page. Until then, there are two ways that I can think of to backup your filters:

Custom filters backup
1. Open the Advanced tab in the settings page.
2. Select all filters by clicking on the checkbox in the top-left corner of the custom filters table.
3. Click on "Copy selected" button that appears below the table.
4. Paste into a text file.

Filter settings backup (incl. custom filters)
1. Open "about:debugging".
2. Click on "Inspect" next to Adblock Plus list item.
3. Run the code below to retrieve the filter settings:

Code: Select all

let settings = await browser.storage.local.get("file:patterns.ini");
4. Run the code below to copy them:

Code: Select all

copy(settings["file:patterns.ini"].content.join("\n"));
5. Paste into a text file.
Hi there,

The custom settings backup is clear as a bell, but I don't quite understand the fliter settings backup instructions.

I assumed initially that 'about debugging' would be located in the web developer menu somewhere but I don't see an option in there to type anything even though the settings button reveals a comprehensive number of options some of which are already checkmarked,

I tried typing 'about debugging' in the browser (Waterfox) location bar and although ABP+ is present in the list there's no "Inspect" button to be seen anywhere; only a Debug link. Clicking that displays a warning that a remote connection would be initiated and the receiver would gain complete control over the browser. Consequently I discarded that option.

So where should I be looking for this elusive module?
Hitchhiker
Posts: 13
Joined: Mon Sep 28, 2020 11:26 am
Location: The Netherlands

Re: Export Custom Filters

Post by Hitchhiker »

I used the suggestion to copy all my custom filters and then to add them in bulk to the list. However, I don't think it's such a good idea to do it this way because the filters are not listed individually, but rather tacked on to the end of the first filter located in the txt list. Here's a pix.

Image

This means that if at some time in the future you want to delete an individual filter you have to delete all of them from the one filter which is visible.

So I would suggest the devs create an option to export / import these kind of filters in ABP+ instead.
M00NCHILD
Posts: 1
Joined: Tue Oct 06, 2020 8:19 pm

Re: Export Custom Filters

Post by M00NCHILD »

Hitchhiker wrote:I used the suggestion to copy all my custom filters and then to add them in bulk to the list. However, I don't think it's such a good idea to do it this way because the filters are not listed individually, but rather tacked on to the end of the first filter located in the txt list. Here's a pix.

This means that if at some time in the future you want to delete an individual filter you have to delete all of them from the one filter which is visible.

So I would suggest the devs create an option to export / import these kind of filters in ABP+ instead.
I support the idea of separating filters! I think this feature will be useful to all users.
Post Reply