How to backup and restore Whitelisted domains ?
Re: How to backup and restore Whitelisted domains ?
Hey akkha,
Thanks for your message.
It should work when run in the context of the options page: location.href = "data:text/plain," + encodeURIComponent(backgroundPage.getUserFilters().exceptions.join("\n"))
All the best,
Thanks for your message.
It should work when run in the context of the options page: location.href = "data:text/plain," + encodeURIComponent(backgroundPage.getUserFilters().exceptions.join("\n"))
All the best,
Re: How to backup and restore Whitelisted domains ?
some details:
click ABP icon, options
press ctrl-shift-i (go into console)
paste this code there:
press enter
a new tab opens with the list of whitelisted domains
click ABP icon, options
press ctrl-shift-i (go into console)
paste this code there:
Code: Select all
location.href = "data:text/plain," + encodeURIComponent(backgroundPage.getUserFilters().exceptions.join("\n"))
a new tab opens with the list of whitelisted domains
Re: How to backup and restore Whitelisted domains ?
Thank You all especially mapx for the detail.
Also how to restore whitelisted domains?
I have to add one by one in: Options -> Whitelisted domains -> + Add domain
Are there anyway to add them all at once ?
Thank You
Also how to restore whitelisted domains?
I have to add one by one in: Options -> Whitelisted domains -> + Add domain
Are there anyway to add them all at once ?
Thank You
Re: How to backup and restore Whitelisted domains ?
Hey akkha!
You are welcome.
Just copy and paste the domains: .split("\n").forEach(function(domain){FilterStorage.addFilter(Filter.fromText(`@@||${domain}^$document`));}) into the spot that says "insert-domains-here"
Let us know in case you have any other question.
You are welcome.
Just copy and paste the domains: .split("\n").forEach(function(domain){FilterStorage.addFilter(Filter.fromText(`@@||${domain}^$document`));}) into the spot that says "insert-domains-here"
Let us know in case you have any other question.

Re: How to backup and restore Whitelisted domains ?
again in the console (where the first part consists of the list of whitelisted domains previously saved):
example
(Courtesy of rach + thomas greiner)
example
Code: Select all
`abc.com
def.com
ghi.com`
.split("\n").forEach(function(domain){FilterStorage.addFilter(Filter.fromText(`@@||${domain}^$document`));})
Re: How to backup and restore Whitelisted domains ?
The new valid way for save / restore:
save:
restore:
save:
Code: Select all
getSubscriptions(false, true, function(subscriptions)
{
var exceptions = [];
var count = subscriptions.length;
subscriptions.forEach(function(subscription)
{
getFilters(subscription.url, function(filters)
{
filters.forEach(function(filter)
{
if (/^@@\|\|([^\/:]+)\^\$document$/.test(filter.text))
exceptions.push(filter.text);
});
if (--count == 0)
location.href = "data:text/plain," + encodeURIComponent(exceptions.join("\n"))
});
});
});
Code: Select all
importRawFilters(
`abc.com
def.com
ghi.com`.replace(/^.*$/gm, function(domain) { return `@@||${domain}^$document`; }), false);
Re: How to backup and restore Whitelisted domains ?
Ah ha! This is the function i've been looking for, for a long while! I have a huge list of whitelisted domains (some of which need the extra add revenue to operate) so good to know when I upgrade next month I can have it all backed up without hassle of going through and whitelisting a bunch all over again.
Re: How to backup and restore Whitelisted domains ?
mapx thanks! Your version worked fine for me. Successefully saved my own "white list" 

Re: How to backup and restore Whitelisted domains ?
Doesn't work:
Uncaught ReferenceError: backgroundPage is not defined
Uncaught ReferenceError: backgroundPage is not defined
Re: How to backup and restore Whitelisted domains ?
I pasted these above code but it doesnt work 

Re: How to backup and restore Whitelisted domains ?
Open Google Chrome and press Settings and go to the menu in Google Chrome > Bookmarks. Chose Bookmark Manager and press CTRL + Shift + O on the keyboard. Choose the directory for saving the file and press Save. You’re done!
Re: How to backup and restore Whitelisted domains ?
Just what I was needing!
thanks
thanks
Re: How to backup and restore Whitelisted domains ?
Thanks so much!
I had the same question and find it just easily in the first post. Exactly, what I was looked for.
Cheers!
I had the same question and find it just easily in the first post. Exactly, what I was looked for.
Cheers!
Re: How to backup and restore Whitelisted domains ?
A very simple way would be to save all the links in a notepad then restore them after installing the adp again.