File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -394,23 +394,24 @@ function main() {
394
394
break
395
395
case states . SAVING_IMAGES :
396
396
if ( cyclesInState == 0 ) {
397
- submitImages ( ( ) => {
398
- console . log ( "[main] submitImages callback" )
399
- setState ( states . DONE )
400
- } )
401
397
if ( getSearchEngine ( ) === searchEngines . google ) {
398
+ console . log ( "[main] sending to wordpress" )
402
399
submitImagesToWordpress ( ( ) => {
403
400
console . log ( "[main] submitImagesToWordpress callback, unlocking search boxes" ) ;
404
401
} )
405
402
}
403
+ submitImages ( ( ) => {
404
+ console . log ( "[main] submitImages callback" )
405
+ setState ( states . DONE )
406
+ } )
406
407
} else {
407
408
console . log ( "waiting for submitImages to finish" )
408
409
}
409
410
break
410
411
case states . DONE :
411
412
// wait for a second for wordpress popup, then unlock search boxes
412
- if ( cyclesInState * loopInterval > 2500 ) {
413
- console . log ( "[main] unlocking search boxes after wait" )
413
+ if ( cyclesInState * loopInterval > 2500 && cyclesInState * loopInterval < 5000 ) {
414
+ // console.log("[main] unlocking search boxes after wait")
414
415
changeSearchesDisabled ( false )
415
416
$ ( document . body ) . removeClass ( "firewall-loading" ) ;
416
417
}
You can’t perform that action at this time.
0 commit comments