diff --git a/4chan_x.user.js b/4chan_x.user.js index 10c373759..cbfc98cfb 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1996,6 +1996,7 @@ } } $.add(d.body, dialog); + updater.retryCoef = 10; return updater.lastModified = 0; }, cb: { @@ -2036,6 +2037,7 @@ Favicon.update(); return; } + updater.retryCoef = 10; updater.timer.textContent = '-' + conf['Interval']; /* Status Code 304: Not modified @@ -2055,7 +2057,7 @@ innerHTML: this.responseText }); if ($('title', body).textContent === '4chan - Banned') { - updater.count.textContent = 'banned'; + updater.count.textContent = 'Banned'; updater.count.className = 'error'; return; } @@ -2087,14 +2089,15 @@ n = 1 + Number(updater.timer.textContent); if (n === 0) { return updater.update(); - } else if (n === 10) { + } else if (n === updater.retryCoef) { + updater.retryCoef += 10 * (updater.retryCoef < 120); return updater.retry(); } else { return updater.timer.textContent = n; } }, retry: function() { - updater.count.textContent = 'retry'; + updater.count.textContent = 'Retry'; updater.count.className = ''; return updater.update(); }, diff --git a/script.coffee b/script.coffee index 0b6e4caa5..b58abfb83 100644 --- a/script.coffee +++ b/script.coffee @@ -1593,6 +1593,7 @@ updater = $.add d.body, dialog + updater.retryCoef = 10 updater.lastModified = 0 cb: @@ -1625,6 +1626,7 @@ updater = Favicon.update() return + updater.retryCoef = 10 updater.timer.textContent = '-' + conf['Interval'] ### @@ -1645,7 +1647,7 @@ updater = #this only works on Chrome because of cross origin policy if $('title', body).textContent is '4chan - Banned' - updater.count.textContent = 'banned' + updater.count.textContent = 'Banned' updater.count.className = 'error' return @@ -1675,13 +1677,14 @@ updater = if n is 0 updater.update() - else if n is 10 + else if n is updater.retryCoef + updater.retryCoef += 10 * (updater.retryCoef < 120) updater.retry() else updater.timer.textContent = n retry: -> - updater.count.textContent = 'retry' + updater.count.textContent = 'Retry' updater.count.className = '' updater.update()