How to download saves stored in IndexedDB using JS

To download saves you need to open console of browser and execute following script:

((key) => {
    const request = indexedDB.open("js-dos-cache (guest)", 1);

    request.onerror = (event) => {
        console.error("Database error: " + event.target.error);
    };

    request.onsuccess = (event) => {
        const db = event.target.result;
        const transaction = db.transaction("files", "readonly");
        const objectStore = transaction.objectStore("files");

        const getRequest = objectStore.get(key);

        getRequest.onsuccess = (event) => {
            const result = event.target.result;
            if (result) {
                const blob = new Blob([result], { type: "application/zip" });
                const url = URL.createObjectURL(blob);
                console.log(result);
                window.open(url, "_blank");
            } else {
                console.log("No data found for key 'abc'");
            }
        };

        getRequest.onerror = (event) => {
            console.error("Error retrieving data:", event.target.error);
        };
    };
})("");

You need to replace last “” with key from IndexedDB called js-dos-cache (guest).

Watch this video to learn how to do it:

(post deleted by author)

I don’t know if I’ve been lucky, but I’ve been able to download some Warcraft 2 saves under Linux going to “~/.mozilla/firefox/.default/storage/default/https+++dos.zone/idb/.files”. Aside for an empty directory “journals”, there were three zipfiles named 1, 2 and 5. Yes, without any extensions, just 1, 2 and 5 of 90, 15 and 3 megs respectively. Doing a simple hexdump showed that they were probably what I was looking for: the first two contained the game (exe and everything) the last, 5, contained the saves.