Skip to content

Instantly share code, notes, and snippets.

@eduwass
Forked from marcosnakamine/script.js
Created February 28, 2019 19:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eduwass/4d41cccb09d553f70cf9b3759ed8d731 to your computer and use it in GitHub Desktop.
Save eduwass/4d41cccb09d553f70cf9b3759ed8d731 to your computer and use it in GitHub Desktop.
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