Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
jQuery - WP Smush auto click
setInterval(function(){
botao = jQuery('#smush-box-meta-boxes-bulk > div.sui-box-body > div.wp-smush-bulk-wrapper > button');
if( botao.attr('disabled') != 'disabled' ) {
botao.trigger('click');
}
}, 1000);
@Sps113
Copy link

Sps113 commented Jul 15, 2021

setInterval(function(){ 
	botao = jQuery('a.wp-smush-all > i');
	if( botao.attr('disabled') != 'disabled' ) {
		botao.trigger('click');
	}
}, 1000);

@eduwass
Copy link
Author

eduwass commented Jul 15, 2021

setInterval(function(){
botao = jQuery('a.wp-smush-all > i');
if( botao.attr('disabled') != 'disabled' ) {
botao.trigger('click');
}
}, 1000);

Is this the new format?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment