Chrome stores .user.js
scripts in a .ldb
, which isn't in a user accessible format to recovery. On some versions of macOS the provided python script can't compile the leveldb package. As a workaround, we can use the node level package to recover our userscripts.
brew install node
npm install level
node extract.js "/Users/$(whoami)/Library/Application Support/Google/Chrome Canary/backup/Default/Default/Local Extension Settings/dhdgffkkebhmkfjojejmpbldmpobfkfo"
you need to change the line:
const db = level(directory);
to:
const { Level } = require('level')
const db = new Level('example', { valueEncoding: 'json' })