Is there a way I can set the path of the Stylish addon for .sqlite
file for Firefox and Chrome to the same location? In Firefox I know it's in the extensions.stylish.dbFile
config, but I have no idea where it is in Chrome. My goal is to use the same styles for both Firefox and Chrome.
2 Answers
According to this it is not possible.
http://forum.userstyles.org/discussion/31168/where-are-user-styles-stored-on-chrome
A hard link would do the trick, but the databases have different structures in Firefox and Chrome, so it will do you no good.
For Google chrome/Vivaldi/Chromium-based browsers
- the file you need to back up it located at
$HOME/Library/Application Support/Google/XXXXXX/IndexDB/chrome-extension_fjnbnpbmkenffdnngjfgmeleoegfcffe_0.indexeddb.leveldb/000003.log
- for Google Chrome,
XXXXXX
is Google/Chrome - for Vivaldi,
XXXXXX
is Vivaldi
- for Google Chrome,
- by studying the extension code,
Extensions/fjnbnpbmkenffdnngjfgmeleoegfcffe/1.5.2_0/storage-websql.js
has a propertygetDatabase
which defines the database used for styles storage. - the database is located at
databases/chrome-extension_fjnbnpbmkenffdnngjfgmeleoegfcffe_0/[0-9]+
, but the SQLite DB file contains a table,__WebKitDatabaseInfoTable__
, which has a fieldWebKitDatabaseVersionKey
which is null. This means the bd file is useless and the data is not stored in it.
how to backup and restore
- you can write a shell script to automatically do this for you daily or weekly.
- just zip the
chrome-extension_fjnbnpbmkenffdnngjfgmeleoegfcffe_0.indexeddb.leveldb
folder using7z
ortar
and copy the zip file to icloud or dropbox.
check here, I have comments in this topic.
For firefox
- I actually use the
userContent.css
, which is located at/Users/ruili/Library/Application\ Support/Firefox/Profiles/wbcdxsme.default/chrome/userContent.css
. [if not existed, just create it] - the syntax is specified here
CSS
@-moz-document domain(www.hao123.com) {
}
@-moz-document url(http://www.example.com/test.html) {
}
@-moz-document url-prefix("http://www.example.com"){
}
@-moz-document regexp('http://www\\.example\\.(com|de)/images/.*') {
}