Skip to content

Commit

Permalink
loading new results can take much longer apparently. So let's try at …
Browse files Browse the repository at this point in the history
…least 10 times.
  • Loading branch information
u451f committed Aug 2, 2015
1 parent 6a95466 commit 92f4758
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions js/blocked.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jQuery(document).ready(function() {

setInterval(function(){
if(!resultRows || resultRows < 2) {
if(tries < 5) {
if(tries < 10) {
jQuery.ajax({
beforeSend: function() {
jQuery('#blocked-results-loader').fadeIn('fast');
Expand All @@ -36,9 +36,11 @@ jQuery(document).ready(function() {
jQuery('#blocked-results-loader').fadeOut('slow');
}
});
tries++;
console.log("Trying to load more results: " + tries);
}
tries++;
console.log("Trying to load more results: " + tries);
} else {
console.log("Can't load more results.");
}
}
}, 4000);
});

0 comments on commit 92f4758

Please sign in to comment.