Skip to content

Instantly share code, notes, and snippets.

@hanneshal
Created June 26, 2017 15:53
Show Gist options
  • Save hanneshal/581000740f7ec46aa31e47dad421c30d to your computer and use it in GitHub Desktop.
Save hanneshal/581000740f7ec46aa31e47dad421c30d to your computer and use it in GitHub Desktop.
select all media files in Whatsapp WebApp if media tab is open and all needed files are shown in preview
var els = document.getElementsByClassName('media-canvas');
Array.prototype.forEach.call(els, function(el) {
console.log(el);
el.click();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment