Created
April 25, 2023 13:17
-
-
Save insertish/7113eef3accd35cf6ec40f83cddec9ec to your computer and use it in GitHub Desktop.
Export GIFs from Discord GIF favourites
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
seems to work, though it's only getting 40 of them rather than my ~80