Skip to content

Instantly share code, notes, and snippets.

@chfour
Created February 21, 2022 19:10
Show Gist options
  • Save chfour/de0a1acc90078093d92bc0837d6d3ec9 to your computer and use it in GitHub Desktop.
Save chfour/de0a1acc90078093d92bc0837d6d3ec9 to your computer and use it in GitHub Desktop.
Promise.all(Array.from(document.querySelectorAll(".foldername"), async a => {
const url = a.href.replace("/view/", "/file/");
let t = await fetch(url).then(r => r.text());
t = t.match(/https:\/\/download[^"]*/)[0];
return t;
})).then(l => {
const floater = document.createElement("textarea");
floater.style = `background-color: #101010; color: white; z-index: 1000;\
font-family: monospace; font-size: 12pt; position: absolute; top: 1em; left:1em;`;
floater.cols=80; floater.rows=24;
floater.value=l.join("\n");
document.body.appendChild(floater);
});
// mediafire doesn't let you download all files
// in a shared folder, so I made this
// paste output into a file
// then `wget -i [filelist] --content-disposition`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment