Skip to content

Instantly share code, notes, and snippets.

@xPapla
Created April 21, 2022 10:13
Show Gist options
  • Save xPapla/e8f4b64b9d00efc0c4a0fd22ade7079a to your computer and use it in GitHub Desktop.
Save xPapla/e8f4b64b9d00efc0c4a0fd22ade7079a to your computer and use it in GitHub Desktop.
Download all custom backgrounds from google meet
const db = await new Promise((resolve, reject) => {
const request = window.indexedDB.open("meet_fx_db");
request.onerror = event => {
reject("req fail");
};
request.onsuccess = event => {
resolve(event.target.result);
};
});
let i = 0;
db.transaction("meet_fx_store").objectStore("meet_fx_store").openCursor().onsuccess = event => {
const cursor = event.target.result;
if (!cursor) {
console.log("No more entries!");
return;
}
console.log(`Processing key: ${cursor.key}`);
const {
data: { imageFileBlob, timestampMs },
} = cursor.value;
// NOTE: delay to let chrome process files easily
setTimeout(() => {
const link = document.createElement("a");
link.href = URL.createObjectURL(imageFileBlob);
link.download = `${timestampMs}.png`;
document.body.appendChild(link);
link.click();
}, i++ * 500);
cursor.continue();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment