Skip to content

Instantly share code, notes, and snippets.

@marcosnakamine
Created October 24, 2017 13:28
Show Gist options
  • Save marcosnakamine/92fc3e4890e3515acc777c037bb3b3f5 to your computer and use it in GitHub Desktop.
Save marcosnakamine/92fc3e4890e3515acc777c037bb3b3f5 to your computer and use it in GitHub Desktop.
jQuery - WP Smush auto click
setInterval(function(){
botao = jQuery('#wp-smush-bulk-wrap-box > div.box-container > div.wp-smush-bulk-wrapper > button');
if( botao.attr('disabled') != 'disabled' ) {
botao.trigger('click');
}
}, 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment