Skip to content

Instantly share code, notes, and snippets.

@insertish
Created April 25, 2023 13:17
Show Gist options
  • Save insertish/7113eef3accd35cf6ec40f83cddec9ec to your computer and use it in GitHub Desktop.
Save insertish/7113eef3accd35cf6ec40f83cddec9ec to your computer and use it in GitHub Desktop.
Export GIFs from Discord GIF favourites
// Open GIF picker
// Then run:
(() => {
let links = new Set();
function capture() {
const elements = [
...document.querySelectorAll("#gif-picker-tab-panel img"),
...document.querySelectorAll("#gif-picker-tab-panel video")
];
for (const element of elements) {
links.add(element.src);
}
}
new MutationObserver(capture)
.observe(
document.getElementById("gif-picker-tab-panel"),
{ childList: true, subtree: true }
);
window.collect = () => console.info([...links].join('\n'));
})();
// Scroll through entire GIF picker making sure everything loads, then run:
window.collect();
@moosetwin0
Copy link

seems to work, though it's only getting 40 of them rather than my ~80

@moosetwin0
Copy link

that is exactly 40 I mean

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment