Created
January 12, 2021 09:37
-
-
Save KareemMAX/835eb9dbcddaca60e28fd522fda28111 to your computer and use it in GitHub Desktop.
A small script to download stickers from WhatsApp web
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
var jq = document.createElement('script'); | |
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
var stickerNum = 1; | |
setTimeout(() => { | |
jQuery.noConflict(); | |
console.log('jQuery injected'); | |
jQuery('img._5auXc').each(function(){ | |
console.log(this.src); | |
var element = document.createElement('a'); | |
element.setAttribute('href', this.src); | |
element.setAttribute('download', stickerNum + ".webp"); | |
element.style.display = 'none'; | |
document.body.appendChild(element); | |
setTimeout(() => { | |
element.click(); | |
}, 500 * stickerNum); | |
document.body.removeChild(element); | |
stickerNum++; | |
}) | |
}, 2000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment