Skip to content

Instantly share code, notes, and snippets.

View Patrick330's full-sized avatar

Patrick Patrick330

View GitHub Profile
@Patrick330
Patrick330 / download-classdojo-media.js
Last active June 24, 2024 15:29 — forked from travishorn/download-classdojo-media.md
Saving the images and videos from your ClassDojo storyline
/* run this in the console on the ClassDojo page */
function download(url, prefix) {
fetch(url).then(function(t) {
return t.blob().then((b)=> {
var a = document.createElement("a");
a.href = URL.createObjectURL(b);
var n = url.lastIndexOf('/');
var filename = url.substring(n + 1);
a.setAttribute("download", prefix+filename);