14

Recently my chrome glitched and tampermonkey just stopped working. I uninstalled and then reinstalled extension (with hope that scripts stay in place), but my scripts got deleted. Luckily I have a backup of profile directory. So how I can restore them?

2 Answers 2

15

Not clean backup but something. Go to:

%LocalAppData%\Google\Chrome\User Data\Default\Local Extension Settings\dhdgffkkebhmkfjojejmpbldmpobfkfo\

And find file 000003.log or similar. This file stores whole history of changes of all userscripts. Just search for website name, that uses your script.

8
  • 1
    I have a very similar issue. However, 000003.log appears to be a binary file. How can its script history data be read in plain text?
    – MJH
    Commented Nov 27, 2016 at 4:38
  • 2
    @MJH I just used Windows build-in Notepad.
    – Artem P
    Commented Nov 27, 2016 at 6:39
  • Strange. When opened in Sublime Text 3 it appears to be binary data, but when opened in Notepad it appears to be text (rather difficult to read, though). Thanks.
    – MJH
    Commented Nov 27, 2016 at 6:50
  • 1
    Life saver! Side-notes: - On a mac, this lives in ~/Library/Application\ Support/Google/Chrome/Default/Local\ Extension\ Settings/dhdgffkkebhmkfjojejmpbldmpobfkfo/000003.log - Using Sublime Text, go ahead and use File>Reopen with Encoding and select UTF-8. Sublime defaults to a binary file when it sees those 0x00 NULL characters.
    – aaiezza
    Commented Jul 9, 2019 at 17:17
  • 1
    Backup the whole folder, not just the file. On my old Chrome the file name was 000026.log and on the new Chrome, the file name was 000003.log. Just pasting the file doesn't work. Renaming to 000003.log doesn't work either. Copy pasting the whole folder did move all the user scripts from old Chrome to new Chrome.
    – KulaGGin
    Commented May 8, 2023 at 15:42
4

You can use this python script to extract your scripts from the profile backup folder:

https://gist.github.com/derjanb/9f6c10168e63c3dc3cf0

6
  • 1
    Please read the question again carefully. Your answer does not answer the original question. OP is using Windows not Linux or OS X
    – DavidPostill
    Commented Nov 28, 2016 at 12:57
  • 3
    @DavidPostill And what is the problem with installing Python for Windows? Another option is to boot a Linux Live CD.
    – derjanb
    Commented Nov 29, 2016 at 19:52
  • @derjanb, the problem is that your software shouldn't be causing problems requiring manual intervention like this to begin with and if you are just providing a solution for yourself then accept when it is not useful. Commented Nov 27, 2022 at 4:23
  • @GµårÐïåñ the problem is not caused by Tampermonkey which only is an extension that uses the a browser API to store data. A slightly modified solution can be used to read and recover every extension's storage.
    – derjanb
    Commented Nov 29, 2022 at 23:58
  • @derjanb Yes it is in this case, it is an extension but not just an extension, it hold a lot of data such as the scripts and when like today it comes up saying "Extension corrupted" click to "repair" and it wipes everything out, then yes it is a problem. Of course it can ready any, but we are talking specifically for this extension and not everyone is on Linux and this exact script you posted actually does not work on the latest that I tried because I just lost over 80 scripts, luckily I only lost the latest revision as I have backups but still work lost regardless. Thanks. Commented Dec 1, 2022 at 6:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .