diff --git a/jirasort.js b/jirasort.js index e129831..04d0076 100644 --- a/jirasort.js +++ b/jirasort.js @@ -52,7 +52,7 @@ function actually_do_sort(elem) { function wait_for(elem_selector, callback) { var tries = 0; - var maxtries = 35; + var maxtries = 0; var wantit = 1; var actually_wait = function() { var elem = document.querySelector(elem_selector); @@ -64,7 +64,7 @@ function wait_for(elem_selector, callback) { setTimeout(actually_wait, 250 * Math.pow(1.1, tries)); } else { tries++; - if (tries >= maxtries) { + if (maxtries != 0 && tries >= maxtries) { console.warn('doesnt exist after ' + maxtries + ' attempts: ' + elem_selector); } else { setTimeout(actually_wait, 250 * Math.pow(1.1, tries)); @@ -73,7 +73,7 @@ function wait_for(elem_selector, callback) { } else { if (elem) { tries++; - if (tries >= maxtries) { + if (maxtries != 0 && tries >= maxtries) { console.warn('still exists after ' + maxtries + ' attempts: ' + elem_selector); } else { setTimeout(actually_wait, 250 * Math.pow(1.1, tries));