darkreader settings are stored in which file ?

Created on 11 Aug 2018  路  3Comments  路  Source: darkreader/darkreader

As I kept using darkreader, I've added some sites to the Not invert listed list, and changed the theme engine for a lot of other sites. In which file these customizations are written ? I'd like to start including this file in my daily backup, in case I need to reinstall darkreader on Chrome, or install it on another browser and take with me all my customizations. Once I started using darkreader, I can't live without it ! So I'd like to keep safe all my customizations.

I've seen that #615 and #467 touch the same subject, but I wondered whether something had changed since those issues were opened. If your instructions in those issues is the way to get a backup of the settings, please forgive me for opening yet another issue.

I'm using darkreader installed from git master (6d468a4) with Google Chrome 68.0.3440.106 on Xubuntu 18.04.1

Most helpful comment

Just pushed an update 4.6.3.

Now to get all the settings use

chrome.storage.sync.get(null, (settings) => console.log(JSON.stringify(settings, null, 4)));

To get site list only use

chrome.storage.sync.get('siteList', (settings) => console.log(JSON.stringify(settings, null, 4)));

There is no UI for editing all the settings yet. I'm going to add at least a JSON editor. Currently you can edit settings using the console:

chrome.storage.sync.set(JSON.parse('json text here'), () => console.log(chrome.runtime.lastError || 'OK'));

and then restart

chrome.runtime.reload();

All 3 comments

Just pushed an update 4.6.3.

Now to get all the settings use

chrome.storage.sync.get(null, (settings) => console.log(JSON.stringify(settings, null, 4)));

To get site list only use

chrome.storage.sync.get('siteList', (settings) => console.log(JSON.stringify(settings, null, 4)));

There is no UI for editing all the settings yet. I'm going to add at least a JSON editor. Currently you can edit settings using the console:

chrome.storage.sync.set(JSON.parse('json text here'), () => console.log(chrome.runtime.lastError || 'OK'));

and then restart

chrome.runtime.reload();

I've just upgraded to latest master and backed up my config following your instructions. Thanks a lot for the detailed answer, this is good reference material !

@alexanderby when the quota is exceeded and switched to local storage it appears I then get an outdated list from sync (from when it switched). What DB is the local storage using if I need to back it up after the switch? TIA!

Was this page helpful?
0 / 5 - 0 ratings