Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Download all .jpg attachments in an expanded gmail thread
var els = document.querySelectorAll('span[download_url]')
for(var i=0; i < els.length; i++){
var attr = els[i].getAttribute('download_url');
if(attr.indexOf('jpg:https') != -1){
var url = 'https' + attr.split('jpg:https')[1];
document.location.href = url;
}, i * 1000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.