Comments

Log in with itch.io to leave a comment.

(+1)

this game is so cute and endearing. i really love the art style. is there some way i can save the pictures i draw locally? thanks!! ヽ(o・∀・)ノ

(+1)

I got it! 

(5 edits) (+1)

Here's how I downloaded all my saved DoodleMagic drawings as a zip:

1. Open the game in your browser (I’m using Edge, Chrome probably works too).

2. Open Developer Tools

  • Press F12 (or right click → Inspect)

3. Go to Console

4. At the top of the console there’s a dropdown that usually says “top”. Click it and switch to "index.html" (or whatever looks like the game frame). If you don’t do this, it might not find the files.

5. Paste this script into the console and hit Enter (you might have to first input 'allow pasting' before you can paste this.

(async () => {
  // ---- Settings ----
  const DB_NAME = "/userfs";
  const STORE_NAME = "FILE_DATA";
  const MATCH = "/drawings/";            // downloads any file whose key contains this
  const ZIP_NAME = "drawings.zip";       // output filename
  // ---- Load JSZip (no install needed) ----
  if (!window.JSZip) {
    await new Promise((resolve, reject) => {
      const s = document.createElement("script");
      s.src = "https://cdn.jsdelivr.net/npm/jszip@3.10.1/dist/jszip.min.js";
      s.onload = resolve;
      s.onerror = reject;
      document.head.appendChild(s);
    });
  }
  const db = await new Promise((res, rej) => {
    const r = indexedDB.open(DB_NAME);
    r.onsuccess = () => res(r.result);
    r.onerror = () => rej(r.error);
  });
  const getAllKeys = () =>
    new Promise((res, rej) => {
      const tx = db.transaction(STORE_NAME, "readonly");
      const store = tx.objectStore(STORE_NAME);
      const r = store.getAllKeys();
      r.onsuccess = () => res(r.result);
      r.onerror = () => rej(r.error);
    });
  const getValue = (key) =>
    new Promise((res, rej) => {
      const tx = db.transaction(STORE_NAME, "readonly"); // fresh tx per read
      const store = tx.objectStore(STORE_NAME);
      const r = store.get(key);
      r.onsuccess = () => res(r.result);
      r.onerror = () => rej(r.error);
    });
  const keys = await getAllKeys();
  const drawingKeys = keys.filter(k => typeof k === "string" && k.includes(MATCH));
  console.log(`Found ${drawingKeys.length} file(s) matching "${MATCH}"`, drawingKeys);
  const zip = new JSZip();
  for (const key of drawingKeys) {
    const value = await getValue(key);
    if (!value?.contents) {
      console.warn("Skipping (no contents):", key, value);
      continue;
    }
    // Convert Int8Array -> Uint8Array safely
    const bytes = Uint8Array.from(value.contents, b => (b + 256) % 256);
    // Put in zip with a nice relative path (everything after "/drawings/")
    const idx = key.lastIndexOf(MATCH);
    const relPath = idx >= 0 ? key.slice(idx + MATCH.length) : key.split("/").pop();
    zip.file(relPath || "file.bin", bytes);
  }
  const zipBlob = await zip.generateAsync({ type: "blob" });
  const url = URL.createObjectURL(zipBlob);
  const a = document.createElement("a");
  a.href = url;
  a.download = ZIP_NAME;
  a.click();
  URL.revokeObjectURL(url);
  db.close();
})();


It should download a zip called "drawings.zip" with all your gifs inside.

If it doesn’t work:

  • Make sure your game is open!! 
  • Make sure you switched the dropdown from "top" to "index.html"
  • If it says it found 0 files, the game might be saving them somewhere that isn’t "/drawings/" (so this won’t catch it

(1 edit)

You might have to change the const variables if your stuff is stored somewhere else. This is where I found mine: 


So you might have to change the following if yours isn't the same. :)

const DB_NAME = "/userfs";
const STORE_NAME = "FILE_DATA";
 const MATCH = "/drawings/";

(+1)

omg this works, thanks :)